.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

object id string from windows form back to autocad object id

6 REPLIES 6
Reply
Message 1 of 7
wang890
811 Views, 6 Replies

object id string from windows form back to autocad object id

here's what i am doing:

in windows form, open some drawings, just reading, get the layout object id and list them in list view. then i export the list to excel. then i imported the excel text back into windows form, then i can read the list view and grab the drawings and their layouts accordingly. i am stuck on converting the string object id, such as (-4264276) back to object id object. did some research and people try to play with handles. doesn't apply to what i am doing here. so don't even mention handles to me.

i know that the com library can convert object id to object with a string. as the argument. is there something similar in .net.

see attached picture of the windows form.

thank you

Bob
Stantec
Dell Precision 5530, Prism M320PU, C3D 14/17/19
6 REPLIES 6
Message 2 of 7
odoshi
in reply to: wang890

If it is doable in COM, then just add the TLB as a reference.
Mike Caruso
Autodesk Certified Instructor 2014
AutoCAD/Civil 3D Autodesk Certified Professional 2014, 2015, 2018
www.whitemountaincad.com
Message 3 of 7
wang890
in reply to: wang890

i am going by handle to objectID now.

so just one thing to confirm. the object id does change everytime you open the drawing right? only handle stays the same. the handle only contains 5 characters/number. no wonder software crashes all the time. it's gonna get repeat. they should just use GUID on objects instead. lol.
Stantec
Dell Precision 5530, Prism M320PU, C3D 14/17/19
Message 4 of 7
NathTay
in reply to: wang890

Correct, Handle = Constant, ObjectId = Not Constant between drawing sessions.
Message 5 of 7
Anonymous
in reply to: wang890

Handle is unique per drawing database. You need to use in within the scope
of the drawing. Nothing wrong not being GUID.

"wang890" wrote in message news:6283216@discussion.autodesk.com...
i am going by handle to objectID now.

so just one thing to confirm. the object id does change everytime you open
the drawing right? only handle stays the same. the handle only contains 5
characters/number. no wonder software crashes all the time. it's gonna get
repeat. they should just use GUID on objects instead. lol.
Message 6 of 7
Anonymous
in reply to: wang890

{quote}

....so don't even mention handles to me.

{quote}

ObjectIds are only valid in the session they were obtained from.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD
Supporting AutoCAD 2000 through 2010

http://www.acadxtabs.com

Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");
Message 7 of 7
Anonymous
in reply to: wang890

{quote}

the handle only contains 5 characters/number. no wonder software crashes all
the time. it's gonna get repeat. they should just use GUID on objects
instead. lol.

{quote}

Consider learning some basic aspects of programming.

Handles are hexadecimal representations of numbers, which are more compact
than decimal representations.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD
Supporting AutoCAD 2000 through 2010

http://www.acadxtabs.com

Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");

wrote in message news:6283216@discussion.autodesk.com...
i am going by handle to objectID now.

so just one thing to confirm. the object id does change everytime you open
the drawing right? only handle stays the same. the handle only contains 5
characters/number. no wonder software crashes all the time. it's gonna get
repeat. they should just use GUID on objects instead. lol.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost