I've been looking for a solution to remove the unit string ie Lbs, g, kg from the value given from a 'Mass' value in a text string.
As you may all know, creating text and having a 'physical property - mass' value...the unit string is there...
Lots of people on here have the problem...no-one has got a solution.
Until now...
Basically...open the part you need to get the mass property of in your text string.
Follow the instructions on this webpage...this is the first part...
http://inventorbetter.blogspot.com/2010/10/customizing-iproperties-in-inventor.html
Basically, this creates a Mass property value in the parameters table that you can call on as a text parameter.
It's similar to the custom iproperty model - mass but NOT the same.
Once you have done this, you can go to the drawing of the part and create a text string in the drawing and call it up as shown in this procedure. BUT it still has the unit string.
Here's the best bit that you want to know...
To get RID of the unit string...open up the part again from the drawing...click on the parameter icon...find the user parameter...in the Nominal value column, right click on the value and you get a pop-up that gives you 3 options...
Custom Property Format, Make Multi Value & Delete Parameter.
Click on Custom Property Format.
The pop-up window comes up...showing you the property type...in my case...the 4 left columns read Text, g (grams), Format & Precision...
On the right hand side I have a Preview of the text...then 3 check boxes...Units string, Leading Zero's, Trailing Zero's.
Units string is checked.
Uncheck it.
Close it...Save your part...go back to the drawing and hey presto!...the text now shows the weight you require as a straight value...no units!
Hope this helps you all
Gary
The link you posted to look at for set up has been removed. Do you have another link or the text instructions that go with the link??
Try this link:
http://blogs.rand.com/manufacturing/2011/07/inventor-ilogic-mass-to-custom-iproperties.html
I think that's what you're looking for.
hi jim,
can you help me how to dellete existing custom properties?
i only can add, or change the value. but cannot delete or renaming the custom property.
the instruction link on this page is broken....can you provide a redirect or a new link....
http://inventorbetter.blogspot.com/2010/10/customizing-iproperties-in-inventor.html
above link no longer works.....cant get there from here....
Glenn
That's creating a Custom iProperty directly, the other one seemed to promise creating a parameter linked to the mass iProperty.
To create a paramter based on iProperties.Mass, you need this little snippet of iLogic:
Format:HTML Format Version:1.0 StartHTML: 165 EndHTML: 955 StartFragment: 314 EndFragment: 923 StartSelection: 314 EndSelection: 314
SyntaxEditor Code Snippet
Parameter("partmass")=iProperties.Mass
I add an update before and after, so my code looks like this:
Format:HTML Format Version:1.0 StartHTML: 165 EndHTML: 1497 StartFragment: 314 EndFragment: 1465 StartSelection: 314 EndSelection: 314
SyntaxEditor Code Snippet
InventorVb.DocumentUpdate()
Parameter("partmass")=iProperties.Mass
InventorVb.DocumentUpdate()
This rule is set to run before save on each part and assembly.
I've created a parameter in my part and assembly templates called "partmass." The units for this are set to "lbmass," and the key / export boxes are checked. In the custom property format window, I set propety type to TEXT, and uncheck UNITS STRING, and set the precision to whatever is needed.
The parameter stuff that we did - marking for export, etc - will create a custom iProperty called "partmass." I now create a second custom iProperty called WEIGHT, whose value is set to "=<partmass> LBS" (minus quotes).
Now, every time I save the file, the iLogic code updates the parameter, which updates the iProprties.
This stuff is embedded in my templates, so I don't have to mess with it unless I'm opening up parts that are older than the current template version.
Rusty
Can't find what you're looking for? Ask the community or share your knowledge.