Showing posts with label template. Show all posts
Showing posts with label template. Show all posts

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, 11 June 2015

Inventor Assembly Template

                There is a lot of info on the internet on how to setup your template files and many of you have already configured the drawing template, adding title blocks, borders and some symbols maybe. You have probably edited the part template and changed the default material but chances are that you haven’t altered your assembly template too much if at all.
                I am saying this because I see recurring questions popping out every once in while by frustrated people doing repetitive tasks that could have been avoided with a proper setup of their assembly template.
                One of the main things that will save a lot of frustration would be to setup a new design view representation as default instead of the locked “Master”. God knows how many times I’ve found Assemblies that cannot be saved because of the “Main design view is locked” error.



TIP: Instead of locating the template file and folder you can create a new file using New command and then save those changes in the template using Inventor (big I top left) / Save As / Save Copy As Template command.

                So open your standard.iam file template or fire up the new assembly command. Create a new design view representation, I call mine “Default” and set is as active. This will become the default view and hopefully if you don’t manually change it back to Master you should get over that pesky error on editing locked design views.
                The next one up is BOM. By default the Structured tab is disabled and every time you place a Parts List or edit the BOM you need to activate it. You then set it to All Levels, you may change the default delimiter and most certainly you will add and remove columns to suit your design needs.
So why don’t you go ahead and make these changes persistent in the template?


Depending on your design process and needs you might not use this but I recommend that you add Item QTY to your BOM. This will report the cumulated number of instances in the BOM. The default QTY will report the number of items as long as the item doesn’t have a length (G_L parameter) like structural sections, pipes, etc. in which case it will report cumulated length and not the number of items in the assembly.



                I feel better already, anything else?
                I use a lot of Content Center and Purchase Parts that are library read-only items and when doing large assemblies it’s hard to navigate the browser to find that part you want to edit. So what I like to do is add two folders called CC (Content Center) and PP (Purchased Parts) where I group the files to clean up the browser keeping just the normal parts. It makes a huge difference to be able to find something fast not to hunt and pick all the time. Also, you can now suppress hide or disable a whole folder at a time ;)



                Nice... what else?
                How about adding some virtual parts? This is where you get creative and to utilise the tip above you might want to add them to a folder called Virtual. It’s better to add as much you can think off and then delete them in the assembly later if not used. Creative? Like what? Stuff like oil, grease, man hour costs, machining costs, shipment, painting, etc. Remember that you have Estimated Cost on iproperties and virtual parts although exist in the assembly only they do have iproperties just like any other parts. You can even add a long descriptive text in the comments field. Do you need to add the Estimated Cost to BOM? How about Comments then?



                Keep going please!
                 Anything you need changing in the Document Settings? Maybe you want to change the default Lightning Style, maybe not but you might want to change the default dimension display to “Display as expression” to see the full equation driving that dimension. In here you can change the units as well as modelling precision. Verify all the tabs and make sure there’s nothing else that needs changing.

                Is this it?
                On the short list you might also consider:
·         Deactivating the Contact Solver in Inspect Tab
·         Parameters that you keep adding all the time like bounding box dimensions.
·         Link or embed some excel files
·         Add various iLogic Forms if needed
·         Add some iLogic code like one to prompt you to fill in iProperties at first save.
·         Turn on Center of Gravity
·         Etc.

I suggest that every time you find yourself changing settings in an assembly pause and think if this is something that might be saved in the template. If you do this for a week then you’ve probably got most of things but it’s a good exercise to do every once in a while especially with each new Inventor release.
               

Later,

ADS.