Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

Ilogic Get the appearnce from the part to the drawing

204Е10
Enthusiast

Ilogic Get the appearnce from the part to the drawing

204Е10
Enthusiast
Enthusiast

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

0 Likes
Reply
Accepted solutions (1)
395 Views
3 Replies
Replies (3)

Sergio.D.Suárez
Mentor
Mentor
Accepted solution

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

0 Likes

Anonymous
Not applicable

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

 

0 Likes

204Е10
Enthusiast
Enthusiast

Thanks that is perfect.

0 Likes