Set Part Parameters in Assembly

Anonymous

Set Part Parameters in Assembly

Anonymous
Not applicable

Hi, 

 

I hope this is another simple one...

 

I have created an assembly composed of many parts which have their parameters derived from a simple width and height. The width and height I have made into a simple sketch and saved it as its own part which is also within the assembly. 

 

Since all of the parts are based off these dimensions, I'd like to be able to simply go to the parameters table and update them from there. 

 

What I have to do right now (I understand it isn't THAT much work) is double click the sketch part to edit it, then go into edit sketch, then double click each dimension to update it. Then I click "finish sketch", then hit "return", then in some cases depending on the complexity of my assembly i must hit "rebuild all". 

 

This has become cumbersome and would be so much easier if i could just access these dimensions from within the assemblies parameter table. I have been advised to "export" the dimensions from the part and link them from within the assembly but all that does is make them available for referencing because they are then greyed out and unavailable to edit. 

 

Any help is greatly appreciated. 

 

Thanks

Sandro

Reply
Accepted solutions (1)
23,802 Views
13 Replies
Replies (13)

PaulMunford
Community Manager
Community Manager
You can create an iLogic rule that will 'copy' a parameter value from the assembly down to the part.

 


Autodesk Marketing Manager D&M
Opinions are my own and may not reflect those of my company.
Linkedin Twitter Instagram Facebook Pinterest

0 Likes

DRoam
Mentor
Mentor

Hi Sandro, I've attached an assembly with a part that contains a sketch similar to what you've described.

 

Within the assembly is an iLogic rule that will run whenever the Width or Height parameters in the assembly are changed, and will update the sketch part accordingly. You can adapt this to your model and needs.

 

Hope this helps, let me know if you have any questions 🙂

DRoam
Mentor
Mentor

For anyone who doesn't want to download the files, the iLogic rule simply contains this code:

 

Parameter("Sketch Part.ipt", "Width")=Width
Parameter("Sketch Part.ipt", "Height")=Height

 

The "width" and "height" within the function are the names of the parameters within the sub-part that you want to be driven, while the "width" and "height" to the right of the equals sign are the parameters within the Assembly itself that you want to use to drive the sub-components.

Anonymous
Not applicable
DRoam,

I have never been able to figure out how to open the zipped files on this forum (or even attach them) but I was able to open the assembly with the sketch as unresolved.

So I opened the parameters table and im sure this is exactly what i need to do.

The only problem is that I have not started getting into iLogic just yet so I dont know how you did this.

Thanks
Sandro
0 Likes

DRoam
Mentor
Mentor
Accepted solution

You should be able to just right-click the zipped folder and click "Extract All..." and then open the folder it extracted to.

 

But I went ahead and created  screencast that shows how to open the iLogic panel, create a rule, and use the parameters in you Assembly and your sub-part to control the part's parameters from the assembly. Hopefully it's clear enough. All of this video is done from the assembly level. The "width" and "height" parameters have already been created in the part and the sketch dimensions set equal to them.

 

Just a quick tip about iLogic, if you type the name of a parameter that's directly within the part or assembly that you created the rule in, then any changes to that parameter will automatically fire the iLogic rule. So in this example, the "Width" and "Height" that I clicked after clicking "User Parameters" are blue, which means the rule will fire automatically when they're changed, causing the part's parameters to update.

 

Sorry, I know that's wordy, hopefully it made sense 🙂

 

 

 

Anonymous
Not applicable

WOOO!

 

Sorry but this is super exciting! This is EXACLTY what I need! Not only does this solve my problem but its also my first taste of iLogic and now I can carry this knowledge to ALL of my other assemblies. This just made my life so much easier! 

 

This is fantastic...thank you so much!

 

Sandro

DRoam
Mentor
Mentor

My pleasure!! Haha I can relate to your excitement when it comes to iLogic, I'm continually excited by new prospects for it.

 

One really great resource is Curtis Waguespack's blog "From the Trenches." I've found lots of great iLogic code and ideas there. Once you find the iLogic code to access whatever you're trying to read or modify, be it a parameter, feature, iProperty, etc., the possibilities are endless.

 

Best of luck!

rhasell
Advisor
Advisor

Hi

 

For any future designs of this nature, I would suggest using a "Master part" this can then be used in one of two ways:

1: Derive the part into each of the new parts, and make use of any work features, sketches and parameters.

2: Link the Master part from within the "Parameters" section of the new part, you can then select which parameters you wish to use.

 

What you could then do, is place the master part in your assembly as well, then write the iLogic code to update your skeleton model only, therefore updating all your parts. Depending on the model, link the code to a form.

 

The benefit of working this way, is you can make the changes to the parameters and sketches from one location, and every part and assembly that depend on the master part will update accordingly.

 

Try and look for any information on skeleton/master part modeling.

 

If you need some more information I will gladly help, 99% of my work is conducted in this manner.

 

Reg
2025.2

rhasell
Advisor
Advisor

hI

 

Please ignore previous comment.  DOH!

 

Reg
2025.2
0 Likes

Anonymous
Not applicable
no worries lol , yes this is exactly how i have been doing things, just now i can update that "Master Part" from within the assembly thanks to DRoam 🙂

If I have any other questions I will take you up on your offer tho!

Thanks
Sandro

PaulMunford
Community Manager
Community Manager

Great job DRoam!

 


Autodesk Marketing Manager D&M
Opinions are my own and may not reflect those of my company.
Linkedin Twitter Instagram Facebook Pinterest

0 Likes

mozoub
Explorer
Explorer

This is useful, but after copy design of the model, the iLogic rule will not update with the new .IPT names. 

 

Is there a work around? 

 

For example,  I'll need to copy design this model which not only has 2 parameters but 20. And in an assembly will need about ten models, side by side and will need to update these parameters per assembly as each model is similar but differa in width and depth.  

mz
0 Likes

PaulMunford
Community Manager
Community Manager

You could use some code like this example?

 

Here's some pure API code that is written to run within iLogic that will copy all user parameters from the active assembly all parts referenced by the assembly, regardless of where they are in the assembly structure.  If the parameter already exists in the part, it will update the value.

 

https://forums.autodesk.com/t5/inventor-customization/ilogic-push-all-assembly-user-parameters-to-pa...

 


Autodesk Marketing Manager D&M
Opinions are my own and may not reflect those of my company.
Linkedin Twitter Instagram Facebook Pinterest