Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Custom iProperties on multiple Part files

Status
Not open for further replies.

maripali

Mechanical
Mar 15, 2014
63
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

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.


STF
 
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.


 
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor