Thursday, 17 September 2015

Length parameter format

Those of you working with frame generator or with content center steel shapes know that in order to get the length parameter to display correctly you need to edit the parameter formatting.

So how do we change the content center steel shape template?

Now you have two options:
The first one would be to open the file from Content Center and for that you can click on the big I top left (inventor menu) and in the open flyout menu choose Open from Content Center.
The second option is to edit an already generated file or create one by using place from content center in an assembly.
Once you have the part open you can edit and format the parameter display and then you will need to update family template in content center using this new file.

Let’s detail the first option which seems a bit quicker as well. You need to copy the family first and then generate the file because otherwise Inventor will complain that the new template is not a valid file.

- To copy the content center family to a read-write library like My Library provided by default use the Content Center Editor from the Mange tab, Content Center pane and browser to the family.

- Right click the family and copy it to your library.


- Click on big I top left and from the Open fly-out menu choose Open from Content Center, then choose the family you just copied and in the member window make sure you choose Place as Custom. Length and size it's not important so choose any.


- It will then prompt you for a save location and then will open the file for you. Now you can edit the parameters removing trailing, leading, units, and change precision to suit you.


- Now you need to edit Content Center again with the Manage button and then change from Merged View to your library (THIS IS IMPORTANT) or the extra commands will not be available.

- On the contextual right-click menu choose Replace Family Template and select the file you have edited.


So how about all those files generated already?

 Unfortunately you need to open and edit each and every file individually or use code injector and run this code.

Code injector can be found here and the original ilogic code was posted on the autodesk forum by Curtis Waguespack so head over to the original post and give him kudos.


'-------------start of ilogic code ----------------

'get the parameter
oPL = Parameter.Param("G_L")
'export the paramter as an iProperty
oPL.ExposedAsProperty = True
'set the parameter as a custom property
oFormat=oPL.CustomPropertyFormat
'set the custom iProperty as a text type
oFormat.PropertyType=Inventor.CustomPropertyTypeEnum.kTextPropertyType
'set the precision
oFormat.Precision=Inventor.CustomPropertyPrecisionEnum.kThreeDecimalPlacesPrecision
'set the unit type
oFormat.Units="mm"
'set to show/not show the unit string (use True to show)
oFormat.ShowUnitsString=False
'set to show/not show the trailing zeros (use True to show)
oFormat.ShowTrailingZeros = False
'set to show/not show the leading zeros (use True to show)
oFormat.ShowLeadingZeros = False

'-------------end of ilogic code ----------------

Thursday, 10 September 2015

Linking parameters



                A lot of the times you will need to create matching features (like holes) on different parts. You could create a single sketch and then derive it into separate parts or you could use “Make Layout” on the Layout panel of the Sketch tab, also located in on the Manage tab. This will use sketch blocks or solid bodies but you need to think ahead, and prepare the project beforehand and it will not be covered here. I want to talk to you about all those cases when you would use project geometry while in an assembly to mimic the features of one part into others. While this is fast and well permitted for small assemblies it is not recommended for large assemblies.

                In fact in my Application Options I have stripped out this making sure that adaptivity and associative doesn’t become a memory hog killing Inventor and taking all the fun out.



                TIP: If you hold down CTL wile projecting you will get the opposite of what you settings are. If the settings are set to create adaptive / associative edges then using CTRL you will in fact create non-adaptive / non-associative edges and vice-versa.

                In those rare cases where you just want to copy geometry from one part to the other you still have a lot of options like linking parameters, deriving one’s parameters into the other, copy the features/bodies at the assembly level and all of these options will update automatically for you. 

                But, do you really want it to compute them all the time, when using operations like rebuild all, when opening files, or when you just click update on the quick access?

                What I like to do is derive the parameters of one part into the other, no bodies, no other features, just the parameters and the reason for this is because a derived part can have the option to Suppress the link or Break the link so I can control what gets updated and more important when gets updated.

                TIP: part edges can change with a simple operation like chamfer or fillet and if you rely solely on project geometry with adaptivity you will have broken links and references.

                Give you parameters a name either when dimensioning or by adding them manually in parameters. When the dimension pop-up window shows up you can create custom name parameters dynamically by entering the name with no spaces, just underscore, followed by = and the value you want like this: “Hole_Distance=30”.

stop adjunsting your monitor, the screenshot is not paralel to sketch plane


                When you create a similar part go to 3D Model tab, Insert panel or Create panel and use the Derive button.



                In the settings dialog don’t bring any bodies, expand parameters and tick the ones you need bringing in.
                Now you can dimension your new part and have it update automatically when the original one changes.
                TIP: For coordinated assemblies you should look into linking files with excel which will provide a single source of control for your file updates.

Later,
ADS