Skip to content

A library for Autodesk Inventor that lets you manage user-defined groups of iProperties.

License

Notifications You must be signed in to change notification settings

jordanrobot/iPropertyGroups

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

iPropertyGroups

A library for Autodesk Inventor that lets you manage user-defined groups of iProperties.

What does it do?

Lets say you have a group of iProperties that you want to apply to various Inventor files. Typically you'd hard-code a bunch of iProperties and default expressions/values into your code. Then you'd write custom logic to manage and apply these to documents.

This library takes most of that management drudgery out of your hands. You can define a group of iProperties into an PropertyGroup object. The PropertyGroup objects are a dictionaries of simple strings with some extra methods. If you have multiple PropertyGroup objects, they can be managed from an PropertyGroups object. You can load PropertyGroups objects from json files.

This library will not do any checks against what documents are suitable to be modified (e.g. content center files, library files, etc).

  • Here is a simple iLogic rule showing the library in use:

    AddReference "iPropertyGroups.dll"
    Imports iPropertyGroups
    
    'Create a PropertyGroups object and load a json file into the object.
    Dim oGroups As PropertyGroups = PropertyGroups.LoadJson("C:\Path\to\your\propertygroups-definition.json")
    
    'Get active document object...
    Dim oDoc As Inventor.Document = ThisApplication.ActiveDocument
    
    'Apply PropertyGroups object to the document...
    oGroups.Item("Stock Part").ApplyToAndOverwrite(oDoc)

Documentation

Find the detailed instructions and API reference here.

Dependencies

  • Newtonsoft.Json (10.0.1) to match Autodesk Inventor 2021's version

If building project:

  • Inventor.Interop - user will have to point to the Inventor.Interop location on their own machine. Is usually located "C:\Program Files\Autodesk\Inventor XXXX\Bin\Public Assemblies\Autodesk.Inventor.Interop.dll", where XXXX is the year.

Tests:

License

This code is under an MIT license.

About

A library for Autodesk Inventor that lets you manage user-defined groups of iProperties.

Resources

License

Stars

Watchers

Forks

Packages

No packages published