Community
Inventor Forum
Welcome to Autodesk’s Inventor Forums. Share your knowledge, ask questions, and explore popular Inventor topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

color style

1 REPLY 1
Reply
Message 1 of 2
Anonymous
251 Views, 1 Reply

color style

hi,

is there a way where i can extract the color style of the material i choose for the part.ipt to be mapped out and show it in the title block?

 

inventor 2011

vault pro 2011

1 REPLY 1
Message 2 of 2
bobvdd
in reply to: Anonymous

Several things need to be done to make this work.

 

Step 1:

Add the following iLogic rule to your part template file (or to existing part documents). It will create a custom property called "Colorstyle".

Trigger the rule "Before Save Document". This is important to make sure that the color in the custom property stays up-to-date every time the part gets saved.

 

 

customPropertySet = ThisDoc.Document.PropertySets.Item("Inventor User Defined Properties")
Try
     prop = customPropertySet.Item("Colorstyle")
Catch
     customPropertySet.Add("", "Colorstyle")
End Try
iProperties.Value("Custom", "Colorstyle") =  ThisDoc.Document.ComponentDefinition.Material.RenderStyle.Name

 

 

Step 2:

Start a new drawing. Go to the Document settings  and on the Drawing tab, use the "Additional Custom Model iProperty source" option to select the "Colorstyle" custom property from the ipt file prepared in Step 1.

 

Step3 :

Include the custom property "Colorstyle" in any text of your title block.

"Save Copy As" Template of the drawing  so that you don't have to repeat any of this for the next drawing 🙂

 

Cheers

Bob

 




Bob Van der Donck


Principal UX designer DMG group

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report