Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Custom iProperties on multiple Part files

Custom iProperties on multiple Part files

Custom iProperties on multiple Part files

Dear Folks,

Stacked recently while creating Custom iProperties on multiple Part files.
Overall Length, Width and Height parameters of every part, that later will be used within IDW Part Lists.
Required units in mm with Precision of 0
Also Part surface Area in m^2 with Precision of 0.000 required.

Within Assembly BOM manager I,ve created Custom Property column, named "AREA" and scripted an evaluation to every part row "=<SurfaceArea>".
Partial success happened. All calculations appeared in mm^2, but required in m^2.

Any clues? iLogic rules? VBA?
Replies continue below

Recommended for you

RE: Custom iProperties on multiple Part files

I take it you have created the following parameters in every one of the affected part files:
Length = value
Width = value
Height = value
SurfaceArea = (calculation using length witdth height)

Did you also have to create them with unitless values?
I can't get Inventor to make a parameter with square area as a unit.

You may be able to create another parameter, this one with a different name and its calculation is "SurfaceArea / 1000000".
Then you could access that value through the iProperties and BOM custom property.


RE: Custom iProperties on multiple Part files

Thanks for the response.
I am trying avoid to open every part and set custom parameters.
Still keeping the way to create Length, Width, Height and Area parameters formatted as String from the highest level assembly to every part and subassemble that belongs to it.
Created parameters could be as follows:
Length = Calculated extension in X direction in mm,
Width = Extension in Y direction in mm,
Height = Extension in Z direction in mm,
Area = Calculated by Inventor "surfaceArea = iProperties.Area". This property could be found in iProperties...->Physical tab.

After couple hours of researching I've found myself not so familiar with Inventor API, VB and iLogic programming. But still believe that solution is somewhere here.

RE: Custom iProperties on multiple Part files

There I've found some really good script at:

CODE -->

'current document
doc = ThisDoc.Document
'unit manager of the document
oUOM = doc.UnitsOfMeasure
'get the value of Area
surfaceArea = iProperties.Area
'round the value with 3 valid numbers (optional)
surfaceArea = Round(surfaceArea, 3) 
'convert the value to a string with the unit of the document
surfaceArea = surfaceArea.ToString()   
'update the custom property "Area" we created
iProperties.Value("Custom", "Area") = surfaceArea 
It just works fine for Area parameter. Any way I have to open every part of model and set iLogic Rule in each file till someone will give a clue how to change "doc = all parts that belong to assembly" value.
Also I'd like to change "oUOM = m^2 as UnitsOfMeasure is set to mm".

Length, Width and Height are left to find iLogic script.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login


Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close