Inventor General Discussion

Inventor General Discussion

Reply
Valued Contributor
knowga
Posts: 64
Registered: ‎03-02-2006
Message 1 of 10 (1,411 Views)

How to remove iproperty mass unit string from Mass value in a text string...

1411 Views, 9 Replies
10-03-2011 05:50 AM

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

 

Active Member
MarkDooley
Posts: 9
Registered: ‎04-11-2011
Message 2 of 10 (1,246 Views)

Re: How to remove iproperty mass unit string from Mass value in a text string...

04-27-2012 09:01 AM in reply to: knowga

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??

Distinguished Contributor
JimStrenk
Posts: 146
Registered: ‎06-20-2006
Message 3 of 10 (1,227 Views)

Re: How to remove iproperty mass unit string from Mass value in a text string...

04-28-2012 12:38 PM in reply to: MarkDooley

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.

Jim Strenk

Inventor 2012 Certified Associate
AutoCAD 2012 Certified Associate

Product Design Suite Ultimate 2012, 2013 & 2014

Other than THAT, Mrs. Lincoln, how was the play??
Illinois: Where we send more Govenors to prison, than on to retirement!
Active Member
akhidrosyidi
Posts: 7
Registered: ‎10-08-2012
Message 4 of 10 (1,022 Views)

Re: How to remove iproperty mass unit string from Mass value in a text string...

12-20-2012 11:41 PM in reply to: JimStrenk

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.

New Member
GDERBYSHIRE
Posts: 2
Registered: ‎04-05-2013
Message 5 of 10 (665 Views)

Re: How to remove iproperty mass unit string from Mass value in a text string...

10-16-2013 05:14 AM in reply to: knowga

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

*Expert Elite*
dan_inv09
Posts: 2,311
Registered: ‎12-12-2006
Message 6 of 10 (658 Views)

Re: How to remove iproperty mass unit string from Mass value in a text string...

10-16-2013 07:48 AM in reply to: JimStrenk

That's creating a Custom iProperty directly, the other one seemed to promise creating a parameter linked to the mass iProperty.

*Expert Elite*
dan_inv09
Posts: 2,311
Registered: ‎12-12-2006
Message 7 of 10 (657 Views)

Re: How to remove iproperty mass unit string from Mass value in a text string...

10-16-2013 07:48 AM in reply to: GDERBYSHIRE

This seems broken as well.

*Expert Elite*
LT.Rusty
Posts: 743
Registered: ‎10-23-2012
Message 8 of 10 (641 Views)

Re: How to remove iproperty mass unit string from Mass value in a text string...

10-16-2013 09:53 AM in reply to: dan_inv09

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.

 

 


___________________________________________________________

Product Design Suite Ultimate 2013, 2014, 2015

Work: Dell Precision T1600 (Xeon E3-1280 / 16GB / 512 GB SSD / 250 GB (Internal) / 1 TB (External) / Quadro 600)
Home: i7-4770k / ASUS Z87-Pro / 16GB / 250 GB SSD / 1 TB HDD / 3 TB USB3 HDD / Radeon R9-270X 4GB
Laptop: Toshiba Satellite P755-S5269 (i7-2630QM / 8 GB / 250 GB SSD / 750 GB HDD / GT540M)

New Member
GDERBYSHIRE
Posts: 2
Registered: ‎04-05-2013
Message 9 of 10 (630 Views)

Re: How to remove iproperty mass unit string from Mass value in a text string...

10-16-2013 01:11 PM in reply to: LT.Rusty

Thanks LT Rusty

 

Valued Contributor
knowga
Posts: 64
Registered: ‎03-02-2006
Message 10 of 10 (560 Views)

Re: How to remove iproperty mass unit string from Mass value in a text string...

11-21-2013 06:14 AM in reply to: GDERBYSHIRE
Hello Going back to this topic, I'm currently using Inventor 2013 that i began, I found another simple way of getting mass displayed on a drawing, as text, with no unit string. Create a part and create a drawing for that part. Open the part. Go to the iProperties for the file and click on the Custom tab. Click on Name, create a parameter, I called mine massnounits. Set the type to Number Add it. It appears on the list underneath with a value of zero. Close the iproperties window. Go to the manage tab. Click on add rule I just take the first one, Rule0 The Edit Rule:Rule0 window comes up. Type in the window... iProperties.Value("Custom", "massnounits")=Round(iProperties.Mass) then OK the rule Close the part to return back to the drawing Start a text string by clicking "A" text Click on the drawing to enter the text in the text window click on the down arrow for "Type" and select "Custom Properties - Model" You should see your custom iproperty appear, in my case, massnounits click on the add text parameter arrow to add it to your text window. OK the text window to exit it. And, if like mine, the text you added will show the totalmass as a number. this should just about close this topic out. cheers...gimme some feedback if my usually "Homer"-like tendencies were absent and it works for you all. Regards Gary
Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.