Visual LISP, AutoLISP and General Customization

Reply
Distinguished Contributor
Redraiderr2009
Posts: 164
Registered: ‎04-09-2008
Message 1 of 6 (300 Views)

Handle ID's

300 Views, 5 Replies
04-12-2012 06:52 AM

Is there a way to give an object a new Handle ID number?

*Expert Elite*
Alfred.NESWADBA
Posts: 8,880
Registered: ‎06-29-2007
Message 2 of 6 (298 Views)

Re: Handle ID's

04-12-2012 06:53 AM in reply to: Redraiderr2009

Hi,

 

copy it and remove the source-object.

 

- alfred -

-------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------
Distinguished Contributor
Redraiderr2009
Posts: 164
Registered: ‎04-09-2008
Message 3 of 6 (293 Views)

Re: Handle ID's

04-12-2012 07:00 AM in reply to: Alfred.NESWADBA

Yeah.... I meant more via programming. Well... hold on, maybe you are on to something. I will explore that idea a little more, it's a little roundabout, but that might work.  

 

I want use match properties for hatch patterns, but since our notes are linked to the handle ID numbers of that hatch, a different hatch means it needs a differnt label. I get the area and other data via xdata. Match prop keeps the same handle number but assigns it a different pattern name. I need it to destroy the handle ID and give it a new one. 

*Expert Elite*
dgorsman
Posts: 5,097
Registered: ‎10-12-2006
Message 4 of 6 (285 Views)

Re: Handle ID's

04-12-2012 07:38 AM in reply to: Redraiderr2009

No, you can't assign an arbitrary handle to an object.

----------------------------------
If you are going to fly by the seat of your pants, expect friction burns.
Adopt. Adapt. Overcome. Or be overcome.
A good question will be halfway to a good answer.


*Expert Elite*
Alfred.NESWADBA
Posts: 8,880
Registered: ‎06-29-2007
Message 5 of 6 (282 Views)

Re: Handle ID's

04-12-2012 07:42 AM in reply to: dgorsman

Hi,

 

>> No, you can't assign an arbitrary handle to an object.

Maybe not with LISP (I don't use LISP so my knowledge is very limited for that), but with dotNET or ARX you can. You can e.g. create a new line to get a new handle and then exchange the handle between any object and the handle of that line. Afterwards you can then delete the line.

 

- alfred -

-------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------
*Expert Elite*
dgorsman
Posts: 5,097
Registered: ‎10-12-2006
Message 6 of 6 (265 Views)

Re: Handle ID's

04-12-2012 11:30 AM in reply to: Alfred.NESWADBA

Thats not assigning a new handle, its creating a copy of the object which AutoCAD then assigns a unique handle ID during the creation process.  Its not the original object, even if it has the same properties.  For example, you can't create a new line (even a copy) with handle ID "456AB" even if it's currently unassigned.

----------------------------------
If you are going to fly by the seat of your pants, expect friction burns.
Adopt. Adapt. Overcome. Or be overcome.
A good question will be halfway to a good answer.


You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community