Hello all. I require some expert help if possible please.
I have created a simple iPart that has three length variations, and therefor has three different surface areas.
I have added a simple table to my drawing. The table is linked to the iPart, I have used the column chooser to select the appropriate parameters to illustrate the length variations from the iPart. I would also like to include the surface area for each iPart member alongside each length variation in the table.
I have searched this forum and the Wiki but am yet to establish if I am trying to achieve the impossible.
Advice much appreciated.
Solved! Go to Solution.
ok its a bit of a nightmare. There are two options:
WIth iParts the most stable way is to use the dimensions driving the geometry to work out the surface area with some formulas in the parameters dialogue. I added the final Area column to the iPart table, then generated the iPart members:
Don't worry about the red formula, it stills calculates anyway. Make sure you tick the Export box in the parameters dialogue, otherwise it won't create a corresponding custom iProperty.
The other option is if you aren't going to use iParts then use iLogic to create a custom iproperty and it has access to the surface area physical property.
The might be a way of using iLogic with iParts to avoid creating those formulas, but I need to test it out first. If it works I'll blog about it and post back here in a week or so.
It seems you can bring through Mass & Volume with a simple expression within a custom iproperty but not area, which is just palin weird. Anyway I hope this is what you are after, or is at least workaround.
Thanks very much for your efforts in offering a solution.
The part I am working on is quite an intricate shape so it's not very practical to have to mess around with a formula.
I've had a bash at creating an iLogic rule that updates a custom property every time the geometry changes. The problem comes when it is time to generate the members contained within the iPart table. Having added the custom property (Surface Area) into the iPart table and then generated the member files, the surface area is then updated in the iPart table for each member but the value is the same for all members. The value for each member is equal to that of the active member at the time of member generation.
Hope this makes sense. I look forward to your blog on the subject.
I have recently provided a proposition with ilogic to see the "appearance" value of a part in a idw BOM.
Here is just an update of this post for "surface" of an ipart. But maybe you know already it or part of it.
Here is a possible solution using an “illogic” rule you could use in a BOM of an idw file to show the "value" of the "surface" of the model. But several things need to be done to make this work:
Create your ipart as usual and add the following iLogic rule on the i-part file you are creating).
It will create a custom property called "Surface" with format “Number”and will copy the value of the " Surface " of the ipt file.
customPropertySet = ThisDoc.Document.PropertySets.Item("Inventor User Defined Properties")
prop = customPropertySet.Item("Surface")
iProperties.Value("Custom", "Surface") =iProperties.Area
Trigger the rule "Before Save Document". Save the ipart
Open the Table of the ipart and add the column (tab > properties > custom > surface > add the column
Active and save each member from the structure of the ipart (in order to update individually the iproperties)
Go in the assembly (iam) and edit BOM>Add iProperties column> create a new column >Surface>ok
Insert the ipart in the assembly and save.
Start a new drawing. Go to the “Document Settings” > “Drawing tab” > "Additional Custom Model iProperty source" to select the ipt file (ipart) prepared in Step 1 > “Copy Model iProperties Settings” to select the “Surface”.
Place a view of the Assembly prepared in step 2 and insert a BOM
Edit BOM > Column Chooser > New Properties > select “Surface” > ok
=> A new column should be visible with the Surface values of the different components..
Remark: You could have also the possibility to include all these manipulations directly in your templates.
I hope this can help you.
Thank you. I had more or less established what you have stated above. I used your code and that works fine.
My only issue is the fact that you have to activate each member, then save the part, and repeat for all members to update the table before calling this information up on the drawing table.
Some of our iParts contain hundreds of members, the above process would be very cumbersome. The whole thing would be much more simple if the area property could be linked directly to the drawing. There obviously is not much demand for this to be added.