Pushing Assembly/Part parameters to connected drawing

Pushing Assembly/Part parameters to connected drawing

Anonymous
Not applicable
671 Views
2 Replies
Message 1 of 3

Pushing Assembly/Part parameters to connected drawing

Anonymous
Not applicable

Hey guys,

i have a question: is it possible to push parameters from an assembly/part to a connected and similiarly name drawing?

 

I'm attaching my code (it's a BFD to me...don't hurt me too bad)

Dim partDoc As PartDocument
'partDoc = ThisApplication.ActiveDocument
Dim RawPartNumber As String
Dim DrawingOfModel As String
Dim FinPartNumber As String

'Dim propertyName As String = "MOTOR_HP"


RawPartNumber = ThisDoc.PathAndFileName(True) 'without extension
MessageBox.Show(RawPartNumber, "Title")

FinPartNumber = Replace(RawPartNumber,"-0__ATL_000.iam","")
MessageBox.Show(FinPartNumber, "Title")

DrawingOfModel = Replace(RawPartNumber,"-0__ATL_000.iam","-1__ATL_000.idw")
MessageBox.Show(DrawingOfModel, "Title")

iProperties.Value("Custom", "MOTOR_HP") = Parameter(DrawingOfModel,"MOTOR_HP") 

 

0 Likes
Accepted solutions (1)
672 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable

for some reason, i get an error saying it couldn't find the file, but when i run 

ThisDoc.Launch(DrawingOfModel)

it opens the file so i know it can find it.

0 Likes
Message 3 of 3

Anonymous
Not applicable
Accepted solution

I would take a slightly different approach.

 

I would always pull data to the drawing, from the drawing itself, in the image below, you can see that it's really easy to get to the user parameters of a part.

@ClintBrown3D Autodesk Inventor 207.png

BUT, depending on the application, you probably don't need any iLogic, if you are just looking to pull data from the part/assembly.

 

If you add text to your drawing, you can include any of the model or user parameters on the drawing.

@ClintBrown3D Autodesk Inventor 210.png