Hole Table - Part No in Title

Hole Table - Part No in Title

Cris-Ideas
Advisor Advisor
232 Views
2 Replies
Message 1 of 3

Hole Table - Part No in Title

Cris-Ideas
Advisor
Advisor

How to put PART NUMBER in the title of the Hole Table on the drawing.

 

Cris.

Cris,
https://simply.engineering
0 Likes
233 Views
2 Replies
Replies (2)
Message 2 of 3

johnsonshiue
Community Manager
Community Manager

Hi Cris,

 

Besides writing an elaborated iLogic rule, I don't think an out-of-the-box solution exist. You will need to manually enter it unfortunately.

Many thanks!



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer
0 Likes
Message 3 of 3

A.Acheson
Mentor
Mentor

Hi @Cris-Ideas 

Try this rule out and see how you go. Not tested now but it should pull the first views model document  part number iproperty into the hole table title for you. 

Dim drawDoc As DrawingDocument = ThisApplication.ActiveDocument 

'Set a reference to the active sheet. 
Dim activeSheet As Sheet = drawDoc.ActiveSheet

Dim drawView As DrawingView = activeSheet.DrawingViews(1)

Dim modeldoc As Document = drawView.ReferencedDocumentDescriptor.ReferencedDocument 

'Get the PropertySets object.
Dim propSets As PropertySets = modeldoc.PropertySets

'Get the design tracking property set.
Dim propSet As PropertySet = propSets.Item("Design Tracking Properties")

'Get the part number iProperty.
Dim partNum As [Property] = oPropSet.Item("Part Number")
activeSheet.HoleTables(1).Title = partNum.Value

 

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan