Showing results for 
Search instead for 
Did you mean: 

Unique ID For Objects

Valued Contributor
Valued Contributor


I come from AutoCAD background.


When you create an object (even non-graphical object like blockdefinition) in AutoCAD, AutoCAD assigns a unique (in that


drawing) ID to it. (As far as I remember, only selection sets do not have handles). AutoCAD retains this handle even when


that object is deleted. It is not assigned to any other object in that drawing.


In programming, this handle is available as EntityName in AutoLISP and ObjectID in VB. (These are however different from the


handle). This has many advantages, especially in programming.


For example, I can share the same object in multiple languages using conversion like EntityName > Handle > ObjecttID and vice


versa. Also storing objects in variables becomes easier.


Most of the Solid Modellers (Inventor, SolidEdge) must be having this concept internally. However, none of them expose


anything similar to handle in API. This causes inconvenience in identifying objects and storing them in variables.


They provide other facilities like ReferenceKey or Attributes. But this means extra work for the programmers.


My questions:


1) Why solid Modelling APIs do not provide this facility. What could be the pros and cons.

2) Do you think they should provide this for making the life of Progrmmers a bit more easier?


Your take on this.

- Sanjay Kulkarni 


Posted by: Sanjay Kulkarni
Post date: 5/29/2010 7:34:55 AM


RE: Unique ID For Objects

Valued Contributor
Valued Contributor

[Copy pasted from my LinkedIn response]


In COM programming, each COM object has a unique pointer. You can easily compare two objects for equality using this pointer. Depending on the programming language you're using, the process of comparing may vary. I fail to see the issue.


Posted by: Jason Newell
Post date: 6/1/2010 7:50:11 AM