dbconnect return connections key value

dbconnect return connections key value

Anonymous
Not applicable
808 Views
3 Replies
Message 1 of 4

dbconnect return connections key value

Anonymous
Not applicable

Hi,

 

I’m struggling for a quit long time now with the following task:

I have autocad object connected via dbconnect to the external databse.

Is it possible using autolisp to return key value of the connection? For example:

 

Some geometry is connected to the data set:

id (key) [M-SW-01/A]; material [some material];  …

 

When I select the geometry and call lisp routine, it returns “M-SW-01/A”

 

Thanks,

Ivan

0 Likes
809 Views
3 Replies
Replies (3)
Message 2 of 4

braudpat
Mentor
Mentor
Hello

I am not at all a Lisp programmer but if I remember well, you can do a XDLIST (or XLIST ?!) Command on the concerned entity and you will get :
- DB Link Name
- Key Link Value

Regards, Patrice
Patrice ( Supporting Troops ) - Autodesk Expert Elite
If you are happy with my answer please mark "Accept as Solution" and if very happy please give me a Kudos (Felicitations) - Thanks

Patrice BRAUD

EESignature


0 Likes
Message 3 of 4

braudpat
Mentor
Mentor

 

Hello

 

I confirm the command XDLIST (coming from the Express/Bonus routines)

and you will see ONLY the DB Link Name (Code 1000)

and not the Key Value (Code 1004) because the Binary Data is not printed (maybe encrypted !?)  ...

 

The XDATA registered Application is named "DCO15"

 

Regards, Patrice

 

Patrice ( Supporting Troops ) - Autodesk Expert Elite
If you are happy with my answer please mark "Accept as Solution" and if very happy please give me a Kudos (Felicitations) - Thanks

Patrice BRAUD

EESignature


0 Likes
Message 4 of 4

Anonymous
Not applicable

Hello,

Thank you for the suggestion.

the line

 

(setq working_elist(entget (setq source_obj (ssname (ssget) 0))'("DCO15")))

 

almost did it, but as you sad, the link at the code1004 is probably encrypted.

I probably have to dig a bit deeper into ActiveX ADO...

 

thanx again and Happy New Year

Happy New Year

0 Likes