model stock number to drawing stock number

model stock number to drawing stock number

hEINSTEIN
Advocate Advocate
174 Views
1 Reply
Message 1 of 2

model stock number to drawing stock number

hEINSTEIN
Advocate
Advocate

Hi Gents

 

My Components have a stock number that shows up in title block.

Part iproperties:

hEINSTEIN_0-1686773240001.png

 

Drawing Title block:

hEINSTEIN_1-1686773240002.png

 

Drawing iproperties:

hEINSTEIN_2-1686773240002.png

 

 

Can someone help me with an illogic rule which will take the primary model’s Stock number and fill it in to the drawings Stock number.

0 Likes
175 Views
1 Reply
Reply (1)
Message 2 of 2

JelteDeJong
Mentor
Mentor

you can try something like this:

Dim doc As DrawingDocument = ThisDoc.Document
Dim sheet As Sheet = doc.ActiveSheet
Dim view As DrawingView = sheet.DrawingViews.Item(1)
Dim refDoc As Document = view.ReferencedDocumentDescriptor.ReferencedDocument
Dim propSet As PropertySet = refDoc.PropertySets.Item("Design Tracking Properties")
Dim iProperty As [Property] = propSet.Item("Stock Number")

iProperties.Value("Project", "Stock Number") = iProperty.Value

Jelte de Jong
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Blog: hjalte.nl - github.com

0 Likes