Welcome
Collapse Getting StartedGetting Started
Overview
Expand Types of SolidWorks API ApplicationsTypes of SolidWorks API Applications
Expand SolidWorks API Object Model and Class HierarchySolidWorks API Object Model and Class Hierarchy
Collapse Programming with the SolidWorks APIProgramming with the SolidWorks API
Expand Add-insAdd-ins
API Dependent on SolidWorks Being Visible
Arrays
Attributes Imported from ACIS SAT Files
Bitmasks
Block Definitions and Block Instances
Bodies in Body Folders
BOOL and VARIANT_BOOL
Bounding Box and Note Text
COM vs. Dispatch
CommandManager and CommandGroups
Components, Configurations, and Suppression States
Compound Note
ComVisibleAttribute in VSTA macros
Controls, Visual Basic 6.0, and Windows XP
Expand Double Arrays and Integer PairsDouble Arrays and Integer Pairs
Drawing Views and Model Entities
Early and Late Binding
Expand EventsEvents
Features of Components
Helper Functions
Hole Wizard Features and Objects
IDispatch Object Arrays as Input in .NET
Implementation Guidelines
Import and Export File Options
In-process Methods
Instantiate ActiveX Controls as Tabs
Interface Pointers
Keystrokes and Accelerator Keys
Library Features and Objects
Lightweight Components
Line Attributes for View::GetPolyLinesAndCurves
Line Weights
Long vs. Integer
Expand Macro FeaturesMacro Features
Manipulators
Mass Properties
Expand Multibody PartsMultibody Parts
Option Explicit Statement
Partition Rollback and API Handles
Persistent Reference IDs
Presentation Transforms
Expand PropertyManager PagesPropertyManager Pages
.NET Interop Assemblies
Quick Tips and Bubble ToolTips
Return Values
Expand SafeArraysSafeArrays
Selection Criteria
Selection Lists
Selections that Define Features
Setup Project to Distribute SolidWorks Add-in
Smart Pointers
SolidWorks Objects
Sorting Tables
Splines
SQLite
STL Container Classes and Smart Pointers
Suspend Automatic Rebuilds
System Options and Document Properties
Tessellation and Edges
Tracking IDs
Expand Type LibrariesType Libraries
Units
Unmanaged C++ and C++/CLI Code
VBA and SolidWorks x64
Examples and Projects
Expand SOLIDWORKS API HelpSOLIDWORKS API Help
Expand SOLIDWORKS Enterprise PDM API HelpSOLIDWORKS Enterprise PDM API Help
Expand FeatureWorks API HelpFeatureWorks API Help
Expand SOLIDWORKS Costing API HelpSOLIDWORKS Costing API Help
Expand SOLIDWORKS Document Manager API HelpSOLIDWORKS Document Manager API Help
Expand SOLIDWORKS Routing API HelpSOLIDWORKS Routing API Help
Expand SOLIDWORKS Simulation API HelpSOLIDWORKS Simulation API Help
Expand SOLIDWORKS Sustainability API HelpSOLIDWORKS Sustainability API Help
Expand SOLIDWORKS Toolbox API HelpSOLIDWORKS Toolbox API Help
Expand SOLIDWORKS Utilities API HelpSOLIDWORKS Utilities API Help
Expand SOLIDWORKS Workgroup PDM API HelpSOLIDWORKS Workgroup PDM API Help
Expand eDrawings API HelpeDrawings API Help
Hide Table of Contents

Tracking IDs

Overview

Tracking IDs allow you to assign IDs to the following topological entities in order to track them across modeling operations such as split, merge, copy, delete, etc.:

Your application can define tracking IDs that are specific to that application to avoid interference with other applications using ISldWorks::RegisterTrackingDefinition. Because tracking IDs are intended for use by application developers, there are no visual clues that entities have been assigned tracking IDs. You can find the entities assigned tracking IDs in a document using IModelDocExtension::FindTrackedObjects.

Usage

Tracking IDs are supported within a single model document only and are limited to part and assembly documents. Tracking IDs propagate across modeling operations (e.g., splitting a face in two both faces inherit the tracking ID of the original face) while attributes, persistent IDs, and safe entities do not.

The lifetime of a tracking ID is from the time of its creation until a rebuild of the model. Attributes, persistent IDs, and safe entities have longer lifetimes. Persistent IDs exist across SolidWorks sessions, and safe entities continue to exist after a rebuild. Attributes behave like features.

By default, tracking IDs are not persistent across SolidWorks sessions. However, you can create a macro feature to assign tracking IDs, which would then allow you to retrieve tracking IDs across SolidWorks sessions.

You can assign a tracking ID to the result body of a macro feature. You assign the tracking ID as the last step, just before the result body is returned by the rebuild function of the macro feature to avoid modifying the body and losing the tracking ID. You assign the tracking ID to the entire body using IBody2::SetTrackingID or to individual entities using, for example, IFace2::SetTrackingID. The latter allows you to reuse the logic required for IMacroFeatureData::SetFaceUserId (for SolidWorks purposes) for assigning a tracking ID (for your purposes).

Guidelines

You assign a tracking ID before modifying an entity.

You can:

  • obtain bodies to which to assign tracking IDs using IPartDoc::GetBodies2.

  • obtain bodies, belonging to components in assembly documents, to which to assign tracking IDs using IComponent2::GetBodies.

  • propagate tracking IDs from a part document to component instances of that part in an assembly context. Your application can obtain the corresponding face using IModelDocExtension::GetCorrespondingEntity. The same tracking ID used in the part document can be assigned to the corresponding face in the component context.

  • assign:

    • same tracking ID to multiple objects of different types.

    • same tracking ID to edges, faces, loops, and vertices that belong to different bodies.

    • same tracking ID to bodies, edges, faces,  loops, and vertices that belong to different components.

    • multiple tracking IDs to the same object.

    • tracking IDs to temporary bodies, model bodies, surface and solid bodies, and the output bodies of macro features.

You cannot assign tracking IDs:

Implementation

Object

Modeling Operation

Split

Merge

Delete

Replace

Copy

Pattern

IBody2

S

M

D

R

C

P

IEdge

S

M

D

R

C

N/A

IFace2

S

M

D

R

C

P

ILoop2

S

M

D

R

C

N/A

IVertex

S

M

D

R

C

N/A

 

S = Assign ID to the new object resulting from the split operation. The number of objects to which the ID is assigned is incremented by 1.

M = Remove ID from the object being merged into another object. The number of objects to which the ID is assigned is decremented by 1.

D = Remove ID from object being deleted. The number of objects to which the ID is assigned is decremented with 1.

R = Remove ID from object and assign it to the object that replaces it. The number of objects to which the ID is assigned remains the same.

C = Assign ID to the new objects resulting from the copy operation. The number of objects to which the ID is assigned is incremented by the number of new copies.

P = Assign ID to new objects corresponding to the source object being patterned. The number of objects to which the ID is assigned is incremented by the number of new pattern instances. Similar implementation for mirror operations.

N/A = Not applicable.

 



Provide feedback on this topic

SOLIDWORKS welcomes your feedback concerning the presentation, accuracy, and thoroughness of the documentation. Use the form below to send your comments and suggestions about this topic directly to our documentation team. The documentation team cannot answer technical support questions. Click here for information about technical support.

* Required

 
*Email:  
Subject:   Feedback on Help Topics
Page:   Tracking IDs
*Comment:  
*   I acknowledge I have read and I hereby accept the privacy policy under which my Personal Data will be used by Dassault Systèmes

Print Topic

Select the scope of content to print:

x

We have detected you are using a browser version older than Internet Explorer 7. For optimized display, we suggest upgrading your browser to Internet Explorer 7 or newer.

 Never show this message again
x

Web Help Content Version: API Help (English only) 2014 SP05

To disable Web help from within SOLIDWORKS and use local help instead, click Help > Use SOLIDWORKS Web Help.

To report problems encountered with the Web help interface and search, contact your local support representative. To provide feedback on individual help topics, use the “Feedback on this topic” link on the individual topic page.