Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
204Е10
395 Views, 3 Replies

Ilogic Get the appearnce from the part to the drawing

Hi everyone,

 

I've tried to find the code for get the appearance of a part from the drawing and I don't want to use parameters the code would be something like the one shown below: 

 

modelName = IO.Path.GetFileName(ThisDrawing.ModelDocument.FullFileName)
MessageBox.Show(iProperties.PartColor (modelName), "Title")

 

but unfortunately it doesn't work, someone can to help me with it?

Cheers

Sergio.D.Suárez
in reply to: 204Е10

Hi, try the following code. I think it should work for you.

doc = ThisDrawing.ModelDocument
MessageBox.Show(doc.ActiveAppearance.displayname)

 I hope this helps with your problem. regards


Please accept as solution and give likes if applicable.

I am attaching my Upwork profile for specific queries.

Sergio Daniel Suarez
Mechanical Designer

| Upwork Profile | LinkedIn

Anonymous
in reply to: Sergio.D.Suárez

I think he wanted the part appearance, not the document/display appearance.

 

204Е10
in reply to: Sergio.D.Suárez

Thanks that is perfect.