Ilogic Get the appearnce from the part to the drawing

Ilogic Get the appearnce from the part to the drawing

204Е10
Enthusiast Enthusiast
435 Views
3 Replies
Message 1 of 4

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
Accepted solutions (1)
436 Views
3 Replies
Replies (3)
Message 2 of 4

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
Message 3 of 4

Anonymous
Not applicable

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

 

0 Likes
Message 4 of 4

204Е10
Enthusiast
Enthusiast

Thanks that is perfect.

0 Likes