Autodesk Inventor
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Pulling iPropertie s from drawing sheets
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Is there a way, in my drawing template, to set one field as "Part Number iProperty from parent assembly on sheet 1 base view"? I want every single sheet in my .idw to reference the same "Part Number" iProperty from the assembly in the base view of sheet 1. Thanks!
Solved! Go to Solution.
Re: Pulling iPropertie s from drawing sheets
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi there,
try this out. I use it to show the partnumber on another sheet that includes the parts list.
it actually writes the part number of the first placed model into the custom properties. (so you can use it in a titleblock)
you need to name a text parameter Part_nr_sheet1
' exit rule if no part or assembly is in the drawing yet
If (ThisDrawing.ModelDocument Is Nothing) Then Return
'get the filename of the doc the drawing points to
modelName = IO.Path.GetFileName(ThisDrawing.ModelDocument.FullFileName)
Part_nr_sheet1 = iProperties.Value(modelName, "Project", "Part number")
'fires the part nr as shown in the first sheet so it can be used in the partslist sheet titleblock
'without having a drawing view on that sheet
Dim propertyName1 As String = "Part nr list"
oCustomPropertySet = ThisDoc.Document.PropertySets.Item("Inventor User Defined Properties")
Try
oProp = oCustomPropertySet.Item(propertyName1)
Catch
oCustomPropertySet.Add("", propertyName1)
End Try
iProperties.Value("Custom", "Part nr list") = Part_nr_sheet1
iLogicVb.UpdateWhenDone = True
hope this helps you out!
cheers,
Jachin
Re: Pulling iPropertie s from drawing sheets
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi there,
Thanks so much for this rule, I've added it to my drawing template and it works great for iam and ipt files but it brings up an error for presentation files.
"Object reference not set to an instance of an object."
Can the rule be tweaked to suit all files? I'm trying to amend it myself but not luck so far...
Thanks for your help.
Devon Johnson
Inventor 2013
