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

Thank you, this code will work for my purposes but I noticed a couple of things that maybe of value to point out.

 

1.  As the name would suggest, SelectionFilterEnum.kAllPlanarEntities will only work flat planes.  I ended up switching it to SelectionFilterEnum.kPartFaceFilter in order to be able to also select curved surfaces.

 

2.  For an asset, .CopyTo will fail if it you copy to a location that already exist.  In other words, you can only run this rule only once with a particular apperance asset.  I have not implemented it yet but looking at the help page on asset objects, I think would need to have a delete asset method prior to the CopyTo and use the IsUsed property as a condition to make sure it exist.

 

 

Sorry if this is off topic but originally I planned to set the appearance to "As Feature", "As Body, etc.  These options exist when when you right-click and go to properties but they do not exist in the Appearance Browser.  I also confirmed that I cannot CopyTo As Body.  It is like "As Feature" and "As Body" are sometimes grouped with appearance assets but at the same time they do not seem to be treated as appearance assets because it is not something that will be in the library and they do not work in the code.  Are they Appearance Assets?  If not, what are they and what member are they associated with?