Material and appearance illogic to copy to custom iproperty

Material and appearance illogic to copy to custom iproperty

GKPByDesign
Advocate Advocate
651 Views
3 Replies
Message 1 of 4

Material and appearance illogic to copy to custom iproperty

GKPByDesign
Advocate
Advocate

Hey I need some code created please. I will need to use an event trigger on saving the file or when the form is saved or both. I want the selected value for the standard property for both material and appearance to copy to a custom iproperty using illogic. So say the material is steel, then I want this value to be copied to a custom iproperty called gkp_Assembly_Material. Can this be done ? And I want the same for appearance into gkp_Assembly_Apearance. Can someone help please, I’m stuck ! This would neeed to work for ipt and iam files

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

JaneFan
Autodesk
Autodesk
Accepted solution

Hi @GKPByDesign , 

 

Take part file as example, here is the iLogic code: 

iProperties.Value("Custom", "gkp_Assembly_Apearance") = ThisDoc.Document.activeappearance.displayname
iProperties.Value("Custom", "gkp_Assembly_Material") = ThisDoc.Document.activematerial.displayname

 




Jane Fan
Inventor/Fusion QA Engineer
Message 3 of 4

GKPByDesign
Advocate
Advocate

how do I get this to work within an assembly? 

0 Likes
Message 4 of 4

JaneFan
Autodesk
Autodesk

It's different in assembly since every part occurrence has its own appearance and material, or all of them can be controlled in customize design view representations, I am not sure what you are looking to get in your case for assembly document.




Jane Fan
Inventor/Fusion QA Engineer
0 Likes