Skip to content

bretleasure/Inventor.InternalNames

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

21 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Inventor.InternalNames

GitHub Release GitHub Release NuGet Downloads GitHub License GitHub Actions Workflow Status

This repository contains a comprehensive collection of internal names for Autodesk Inventor. These internal names are essential for accessing various Inventor API components programmatically. Each category is organized into its own namespace (e.g., Ribbon, PropertySets, iProperties, Commands, etc.) for easy navigation and usage.

πŸ“‹ Table of Contents

πŸ“¦ Installation

Install the package via NuGet Package Manager:

dotnet add package Inventor.InternalNames

Or via Package Manager Console in Visual Studio:

Install-Package Inventor.InternalNames

πŸš€ Quick Start

Add the using statement to access all internal names:

using Inventor.InternalNames;
using Inventor.InternalNames.Ribbon;
using Inventor.InternalNames.PropertySets;
using Inventor.InternalNames.iProperties;

Basic usage example:

// Access a specific ribbon
var partRibbon = inventorApplication.UserInterfaceManager.Ribbons[InventorRibbons.Part];

// Get a part property value
var partNumber = partDocument.PropertySets[PropertySets.Part.DesignTracking]
    .ItemByPropId[(int)PropertiesForDesignTrackingPropertiesEnum.kPartNumberDesignTrackingProperties].Value;

// Execute a command
inventorApplication.CommandManager.ControlDefinitions[CommandNames.AssemblyCreateComponentCmd].Execute();

πŸŽ€ Ribbon Components

User Interface Components. The internal names are used to identify the user interface components in the Inventor API. The internal names are used in the Ribbon, RibbonTab, and RibbonPanel classes to identify the user interface components.

Available Ribbons

The InventorRibbons struct provides access to all main ribbon types for different Inventor environments:

  • Part - Part modeling environment
  • Assembly - Assembly environment
  • Drawing - Drawing environment
  • ZeroDoc - Zero document state
  • Presentation - Presentation environment
  • iFeatures - iFeature environment
  • UnknownDocument - Unknown document type

πŸ“ Source: src/Inventor.InternalNames/Ribbon/InventorRibbons.cs

Ribbon Tabs

Each document type has its own set of ribbon tabs:

Part Document Tabs

πŸ“ Source: PartRibbonTabs - Contains 46+ ribbon tabs including:

  • SheetMetal, FlatPattern, k3DModel, Sketch, Annotate, Inspect, Tools, Manage, View, Environments, and many more specialized tabs.

Assembly Document Tabs

πŸ“ Source: AssemblyRibbonTabs - Contains tabs for:

  • Assemble, Design, k3DModel, Weld, Electromechanical, TubeAndPipe, CableAndHarness, and more.

Drawing Document Tabs

πŸ“ Source: DrawingRibbonTabs - Contains tabs for:

  • PlaceViews, Annotate, and more drawing-specific functionality.
  • Sketch - Sketching in drawings
  • Tools - Drawing tools
  • And more...

Ribbon Panels

Each tab contains multiple panels organized as nested structures within each document type:

πŸ“ Sources:

Ribbon Examples

Example 1: Accessing Drawing Ribbon Components

// Get the drawing ribbon
var drawingRibbon = inventorApplication.UserInterfaceManager.Ribbons[InventorRibbons.Drawing];

// Access the Place Views tab
var placeViewsTab = drawingRibbon.RibbonTabs[DrawingRibbonTabs.PlaceViews];

// Access the Create panel within Place Views tab
var createPanel = placeViewsTab.RibbonPanels[DrawingRibbonPanels.PlaceViews.Create];

Example 2: Working with Part Environment

// Access Part ribbon
var partRibbon = inventorApplication.UserInterfaceManager.Ribbons[InventorRibbons.Part];

// Get 3D Model tab
var modelTab = partRibbon.RibbonTabs[PartRibbonTabs.k3DModel];

// Access the Create panel for 3D features
var createPanel = modelTab.RibbonPanels[PartRibbonPanels.k3DModelTab.Create];

Example 3: Assembly Environment Navigation

// Access Assembly ribbon
var assemblyRibbon = inventorApplication.UserInterfaceManager.Ribbons[InventorRibbons.Assembly];

// Get Assemble tab
var assembleTab = assemblyRibbon.RibbonTabs[AssemblyRibbonTabs.Assemble];

// Access Component panel
var componentPanel = assembleTab.RibbonPanels[AssemblyRibbonPanels.AssembleTab.Component];

πŸ“„ Property Sets

Property sets contain groups of related properties in Inventor documents. Each document type (Part, Assembly, Drawing) has access to different property sets.

Available Property Sets

Each document type has access to different property sets for managing document metadata and properties:

πŸ“ Sources:

Common Property Sets:

  • SummaryInformation - Basic document information
  • DocumentSummaryInformation - Extended document details
  • DesignTracking - Design tracking and workflow properties
  • UserDefined - Custom user-defined properties

Property Set Examples

Example 1: Accessing Design Tracking Properties

// Get part document
PartDocument partDoc = (PartDocument)inventorApplication.ActiveDocument;

// Access Design Tracking property set
PropertySet designTrackingProps = partDoc.PropertySets[PropertySets.Part.DesignTracking];

// Read specific properties
string partNumber = designTrackingProps["Part Number"].Value;
string description = designTrackingProps["Description"].Value;

Example 2: Working with Summary Information

// Access Summary Information property set
PropertySet summaryInfo = partDoc.PropertySets[PropertySets.Part.SummaryInformation];

// Get document properties
string title = summaryInfo["Title"].Value;
string author = summaryInfo["Author"].Value;
string company = summaryInfo["Company"].Value;

Example 3: User Defined Properties

// Access User Defined property set
PropertySet userDefinedProps = partDoc.PropertySets[PropertySets.Part.UserDefined];

// Add custom property
userDefinedProps.Add("MyCustomProperty", "Custom Value");

// Read custom property
string customValue = userDefinedProps["MyCustomProperty"].Value;

🏷️ iProperties

iProperties are individual property names within property sets. Each document type has an extensive collection of available property names.

Available iProperties

iProperties are individual property names within property sets. Each document type has an extensive collection of available property names:

πŸ“ Sources:

Property Categories Include:

  • Basic Properties: Title, Subject, Author, Keywords, Comments, Part Number, Description, Material
  • Design Tracking: Project, Cost Center, Designer, Engineer, Checked By, Approved By
  • Physical Properties: Mass, Surface Area, Volume, Density
  • Sheet Metal Properties: Flat Pattern dimensions, Sheet Metal Rule
  • Drawing-Specific: Pipe Type, Route Preview, Fitting Material, Diameter, Schedule

iProperty Examples

Example 1: Reading Standard iProperties

// Access Design Tracking property set
PropertySet designProps = partDoc.PropertySets[PropertySets.Part.DesignTracking];

// Read properties using iProperty constants
string partNumber = designProps[iProperties.Part.PartNumber].Value;
string description = designProps[iProperties.Part.Description].Value;
string designer = designProps[iProperties.Part.Designer].Value;
string material = designProps[iProperties.Part.Material].Value;

Example 2: Setting iProperties

// Set various part properties
designProps[iProperties.Part.PartNumber].Value = "ABC-123";
designProps[iProperties.Part.Description].Value = "Main Housing Component";
designProps[iProperties.Part.Designer].Value = "John Smith";
designProps[iProperties.Part.Engineer].Value = "Jane Doe";

Example 3: Working with Physical Properties

// Access Summary Information for physical properties
PropertySet summaryInfo = partDoc.PropertySets[PropertySets.Part.SummaryInformation];

// Read physical properties
double mass = summaryInfo[iProperties.Part.Mass].Value;
double volume = summaryInfo[iProperties.Part.Volume].Value;
double density = summaryInfo[iProperties.Part.Density].Value;

Example 4: Sheet Metal Specific Properties

// For sheet metal parts
if (partDoc.SubType == PartDocumentSubTypeEnum.kSheetMetalDocumentSubType)
{
    double flatWidth = summaryInfo[iProperties.Part.FlatPatternWidth].Value;
    double flatLength = summaryInfo[iProperties.Part.FlatPatternLength].Value;
    double flatArea = summaryInfo[iProperties.Part.FlatPatternArea].Value;
}

⚑ Command Names

Command names are internal identifiers for Inventor commands that can be executed programmatically using the CommandManager. The CommandNames struct contains hundreds of command constants.

Available Commands

πŸ“ Source: CommandNames - Contains hundreds of Inventor command constants

Command Categories Include:

  • General Commands: Update, Continue, Save, Export operations
  • Assembly Commands: Create/Place/Move components, Constraints, Patterns, Mirroring
  • Part Modeling Commands: Extrude, Revolve, Sweep, Loft, Hole, Fillet, Chamfer
  • Drawing Commands: Base View, Projected View, Section View, Detail View, Dimensions
  • Sketch Commands: Line, Circle, Rectangle, Arc, Spline and geometric operations

Command Examples

Example 1: Executing Basic Commands

// Get the command manager
CommandManager cmdMgr = inventorApplication.CommandManager;

// Execute update command
cmdMgr.ControlDefinitions[CommandNames.Update].Execute();

// Start a new sketch
cmdMgr.ControlDefinitions[CommandNames.Part2DSketchCmd].Execute();

Example 2: Assembly Operations

// Place a new component
cmdMgr.ControlDefinitions[CommandNames.AssemblyPlaceComponentCmd].Execute();

// Create assembly constraints
cmdMgr.ControlDefinitions[CommandNames.AssemblyConstraintCmd].Execute();

// Pattern components
cmdMgr.ControlDefinitions[CommandNames.AssemblyPatternComponentCmd].Execute();

Example 3: Part Modeling Operations

// Create extrude feature
cmdMgr.ControlDefinitions[CommandNames.PartExtrudeCmd].Execute();

// Add fillet
cmdMgr.ControlDefinitions[CommandNames.PartFilletCmd].Execute();

// Create hole feature
cmdMgr.ControlDefinitions[CommandNames.PartHoleCmd].Execute();

Example 4: Drawing Commands

// Create base view
cmdMgr.ControlDefinitions[CommandNames.DrawingBaseViewCmd].Execute();

// Add dimensions
cmdMgr.ControlDefinitions[CommandNames.DrawingGeneralDimensionCmd].Execute();

// Create section view
cmdMgr.ControlDefinitions[CommandNames.DrawingSectionViewCmd].Execute();

Example 5: Checking Command Availability

// Check if a command is available before executing
ControlDefinition controlDef = cmdMgr.ControlDefinitions[CommandNames.AssemblyCreateComponentCmd];

if (controlDef.Enabled)
{
    controlDef.Execute();
}

🎨 Asset Library Names

Asset Library Names provide internal identifiers for Autodesk's built-in asset libraries in Inventor. These identifiers are used to programmatically access material libraries, appearance libraries, and other asset collections.

Available Asset Libraries

πŸ“ Source: AssetLibraryNames - Contains asset library GUID constants

Available Libraries:

  • Autodesk Material Library - Standard Autodesk material library
  • Autodesk Appearance Library - Standard Autodesk appearance library
  • Favorites - User's favorites collection
  • Inventor Material Library - Inventor-specific material library

Asset Library Examples

Example 1: Accessing Material Libraries

// Get the asset library manager
AssetLibraries assetLibraries = inventorApplication.AssetLibraries;

// Access the Autodesk Material Library
AssetLibrary materialLibrary = assetLibraries[AssetLibraryNames.AutodeskMaterialLibrary];

// Access the Inventor Material Library
AssetLibrary inventorMaterialLibrary = assetLibraries[AssetLibraryNames.InventorMaterialLibrary];

Example 2: Working with Appearance Libraries

// Access the Autodesk Appearance Library
AssetLibrary appearanceLibrary = assetLibraries[AssetLibraryNames.AutodeskAppearanceLibrary];

// Browse available appearances
foreach (Asset appearance in appearanceLibrary.AppearanceAssets)
{
    Console.WriteLine($"Appearance: {appearance.DisplayName}");
}

πŸ”Œ Application Add-in IDs

Application Add-in IDs provide internal identifiers for Autodesk Inventor add-ins and translators. These GUID constants allow developers to programmatically identify and interact with specific add-ins installed in Inventor.

Available Add-in IDs

πŸ“ Source: ApplicationAddinIds - Contains 70+ application add-in GUID constants

Add-in Categories Include:

  • Core Inventor Add-ins: Content Center, Design Accelerator, Frame Generator, iLogic, iCopy
  • Simulation Add-ins: Stress Analysis, Frame Analysis, Dynamic Simulation
  • Manufacturing Add-ins: Additive Manufacturing, Mold Design, Presentations
  • Translators: STEP, IGES, CATIA V5, SolidWorks, Fusion 360, DWG/DXF, STL, PDF, and many more
  • Specialized Tools: BIM Content, Assembly Bonus Tools, Shared Views, Interactive Tutorial

Add-in ID Examples

Example 1: Checking If Add-ins Are Available

// Get the application add-ins collection
ApplicationAddIns addIns = inventorApplication.ApplicationAddIns;

// Check if iLogic add-in is available
if (addIns.ItemById[ApplicationAddinIds.iLogic] != null)
{
    Console.WriteLine("iLogic add-in is available");
    
    // Get the iLogic add-in
    ApplicationAddIn iLogicAddin = addIns.ItemById[ApplicationAddinIds.iLogic];
}

Example 2: Working with Translator Add-ins

// Check available translators
var translatorIds = new string[]
{
    ApplicationAddinIds.TranslatorSTEP,
    ApplicationAddinIds.TranslatorIGES,
    ApplicationAddinIds.TranslatorCATIAV5Import,
    ApplicationAddinIds.TranslatorSolidWorks,
    ApplicationAddinIds.TranslatorFusion
};

foreach (string translatorId in translatorIds)
{
    var translator = addIns.ItemById[translatorId];
    if (translator != null)
    {
        Console.WriteLine($"Translator Available: {translator.DisplayName}");
    }
}

Example 3: Loading Add-ins Programmatically

// Load the Content Center add-in if available
ApplicationAddIn contentCenter = addIns.ItemById[ApplicationAddinIds.ContentCenter];
if (contentCenter != null)
{
    try
    {
        contentCenter.Activate();
        Console.WriteLine("Content Center add-in loaded successfully");
    }
    catch (Exception ex)
    {
        Console.WriteLine($"Failed to load Content Center: {ex.Message}");
    }
}

Example 4: Enumerating All Available Add-ins

// Get all add-ins and their information
foreach (ApplicationAddIn addIn in addIns)
{
    Console.WriteLine($"Add-in: {addIn.DisplayName}");
    Console.WriteLine($"  ID: {addIn.ClassIdString}");
    Console.WriteLine($"  Description: {addIn.Description}");
    Console.WriteLine();
}

πŸ“š Complete Reference

Namespace Organization

The library is organized into the following namespaces:

Inventor.InternalNames                  // Base namespace with CommandNames, AssetLibraryNames, and ApplicationAddinIds
β”œβ”€β”€ Ribbon                             // Ribbon-related constants
β”‚   β”œβ”€β”€ InventorRibbons               // Main ribbon types
β”‚   β”œβ”€β”€ PartRibbonTabs                // Part document ribbon tabs
β”‚   β”œβ”€β”€ PartRibbonPanels              // Part document ribbon panels
β”‚   β”œβ”€β”€ AssemblyRibbonTabs            // Assembly document ribbon tabs
β”‚   β”œβ”€β”€ AssemblyRibbonPanels          // Assembly document ribbon panels
β”‚   β”œβ”€β”€ DrawingRibbonTabs             // Drawing document ribbon tabs
β”‚   β”œβ”€β”€ DrawingRibbonPanels           // Drawing document ribbon panels
β”‚   β”œβ”€β”€ PresentationRibbonTabs        // Presentation ribbon tabs
β”‚   β”œβ”€β”€ PresentationRibbonPanels      // Presentation ribbon panels
β”‚   β”œβ”€β”€ ZeroDocRibbonTabs             // Zero document ribbon tabs
β”‚   β”œβ”€β”€ ZeroDocRibbonPanels           // Zero document ribbon panels
β”‚   β”œβ”€β”€ iFeatureRibbonTabs            // iFeature ribbon tabs
β”‚   β”œβ”€β”€ iFeatureRibbonPanels          // iFeature ribbon panels
β”‚   β”œβ”€β”€ UnknownDocumentRibbonTabs     // Unknown document ribbon tabs
β”‚   └── UnknownDocumentRibbonPanels   // Unknown document ribbon panels
β”œβ”€β”€ PropertySets                       // Property set names
β”‚   β”œβ”€β”€ Part                          // Part document property sets
β”‚   β”œβ”€β”€ Assembly                      // Assembly document property sets
β”‚   └── Drawing                       // Drawing document property sets
└── iProperties                        // Individual property names
    β”œβ”€β”€ Part                          // Part document property names
    β”œβ”€β”€ Assembly                      // Assembly document property names
    └── Drawing                       // Drawing document property names

Document Type Support

Document Type Ribbons Tabs Panels Property Sets iProperties Commands Asset Libraries Add-in IDs
Part βœ… βœ… βœ… βœ… βœ… βœ… βœ… βœ…
Assembly βœ… βœ… βœ… βœ… βœ… βœ… βœ… βœ…
Drawing βœ… βœ… βœ… βœ… βœ… βœ… βœ… βœ…
Presentation βœ… βœ… βœ… ❌ ❌ βœ… βœ… βœ…
iFeature βœ… βœ… βœ… ❌ ❌ βœ… βœ… βœ…
ZeroDoc βœ… βœ… βœ… ❌ ❌ βœ… βœ… βœ…
Unknown βœ… βœ… βœ… ❌ ❌ βœ… βœ… βœ…

Usage Best Practices

  1. Always check availability: Verify that UI elements exist before accessing them
  2. Use constants: Leverage the provided constants instead of hardcoding strings
  3. Handle exceptions: Wrap API calls in try-catch blocks for robustness
  4. Document context: Consider which document type is active when accessing UI elements

Example: Complete Integration

using Inventor;
using Inventor.InternalNames;
using Inventor.InternalNames.Ribbon;
using Inventor.InternalNames.PropertySets;
using Inventor.InternalNames.iProperties;

public class InventorIntegrationExample
{
    private Application _inventorApp;
    
    public void CompleteExample()
    {
        // 1. Access UI components
        var partRibbon = _inventorApp.UserInterfaceManager.Ribbons[InventorRibbons.Part];
        var modelTab = partRibbon.RibbonTabs[PartRibbonTabs.k3DModel];
        
        // 2. Work with properties
        if (_inventorApp.ActiveDocument is PartDocument partDoc)
        {
            var designProps = partDoc.PropertySets[PropertySets.Part.DesignTracking];
            string partNumber = designProps[iProperties.Part.PartNumber].Value;
            
            // 3. Execute commands
            var cmdMgr = _inventorApp.CommandManager;
            cmdMgr.ControlDefinitions[CommandNames.PartExtrudeCmd].Execute();
            
            // 4. Work with asset libraries
            var assetLibraries = _inventorApp.AssetLibraries;
            var materialLibrary = assetLibraries[AssetLibraryNames.AutodeskMaterialLibrary];
            
            // 5. Check and manage add-ins
            var addIns = _inventorApp.ApplicationAddIns;
            var iLogicAddin = addIns.ItemById[ApplicationAddinIds.iLogic];
            if (iLogicAddin != null)
            {
                iLogicAddin.Activate();
            }
        }
    }
}

🀝 Contributing

Contributions are welcome! If you find missing internal names or have suggestions for improvements, please:

  1. Open an issue describing the missing functionality
  2. Submit a pull request with the additions
  3. Include examples in your contributions

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ”— Related Resources

Sponsor this project

 

Packages

 
 
 

Contributors 2

  •  
  •  

Languages