Below is a list of all identifiers, IDs and persistent references in SOLIDWORKS.
This post goes hand in hand with Persistent ID, sketch segment ID in the SOLIDWORKS API, where we explain how to use every single identifier that is used in the API.
Identifier | Object type | Accessor | Type | Example | Persistent | Assignable | Also has PRID *1 | See note | Example |
Single integer | Component | IComponent2.GetID | int | 12 | Yes | No | Yes | *2 | Link |
Configuration | IConfiguration.GetID | Yes | No | Link | |||||
Feature | IFeature.GetID | Yes | No | Link | |||||
Sheet | ISheet.GetID | Yes? | No | Link | |||||
Edge | IEdge.GetID | No | Yes | ||||||
Light | ILight.GetID | Yes | No | Link | |||||
Layer | ILayer.GetID | Yes | No | No | Link | ||||
Double integer | Sketch segment | ISketchSegment.GetID | 2x int or 2x long | 12-42 | No? | No | Yes | *3 | Link |
Sketch hatch | ISketchHatch.GetID | Link | |||||||
String | Dimension | IDimension.Name IDimension.GetNameForSelection IDimension.FullName | string | D1 [email protected] [email protected]@Part1.Part | No | Yes | Yes | Link | |
Display dimension | IDisplayDimension. GetNameForSelection | [email protected] | Link | ||||||
Feature | IFeature.Name IFeature. GetNameForSelection | Extrude1 Extrude1 | *4 | Link | |||||
Persistent Reference ID | All selectable objects | ModelDocExtensions. GetPersistReference3 | byte array | 176-054-000-000-003-000-000-000-255-254-255-000-000-000-000-255 | Yes | No | – | Link | |
Tracking ID | Body, edge, face, loop, vertex | IBody2.GetTrackingIDs IEdge.GetTrackingIDs IFace2.GetTrackingIDs Iloop2.GetTrackingIDs IVertex.GetTrackingIDs | int | 12 | No | Yes | No | Link |