Custom iProperties using C#

Top  Previous  Next

Here's a function to get the iProperties of an assembly:

 

       static PropertySet GetCustomiProperties (Inventor.AssemblyDocument InvIAMDoc)

       {

           if (InvIAMDoc == null)

           {

               return null;

           }

 

 

           // We will find the things to send to the classifier inside the custom iPropertyies

           PropertySets Sets = InvIAMDoc.PropertySets;

 

           PropertySet CustomSet = null;

 

           // Look in all the property sets for custom user properties...

           foreach (PropertySet s in Sets)

           {

               if (s.Name == "Inventor User Defined Properties")

               {

                   CustomSet = s;

                   break;

               }

           }

 

           return CustomSet;

       }

 

 

Text, images and diagrams © 2021 Owen F. Ransen. All rights reserved. (But copy the source code as much as you want!)