Anything using ADE_OD on Visual Lisp freezes the Autocad Model Space

Anything using ADE_OD on Visual Lisp freezes the Autocad Model Space

Anonymous
Not applicable
690 Views
5 Replies
Message 1 of 6

Anything using ADE_OD on Visual Lisp freezes the Autocad Model Space

Anonymous
Not applicable

I'm trying to use OD table on Visual Lisp Autocad Map 3D 2019 but it always freezes no matter what "ade_od" function I use. Should I load something before ade_od commands?

 

Here is one example:

 

; Define new table (from Object Data Functions Manual)
(setq tabldefn
'(("tablename" . "NEWTABLE")
("tabledesc" . "New Sample Table")
("columns"
; Define a field
(("colname" . "FIELD1")
("coldesc" . "Field1 Description")
("coltype" . "character")
("defaultval" . "Default Value"))
; Define more fields as needed
)
))
; Create the new table
(ade_oddefinetab tabldefn)

 

Thanks in advance

0 Likes
691 Views
5 Replies
Replies (5)
Message 2 of 6

Anonymous
Not applicable

Maybe I found a solution...

For anyone interested check attached file test1.lsp (did not freezes Autocad Model Space)

 

; https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/map-query-through-lisp/td-p/2235108

(setq ade_cmddia_before_qry (getvar "cmddia"))
(setvar "cmddia" 0) 

(mapcar 'ade_dwgdeactivate (ade_dslist))

 

After using any ADE_OD commands run

(setvar "cmddia" ade_cmddia_before_qry)

0 Likes
Message 3 of 6

АлексЮстасу
Advisor
Advisor

Hi, Luis,

 

Programming questions about are probably best answered by Autodesk Developer's Network (ADN).

 

You've probably seen themes about add-ons for OD (ODEDIT, ODCLASS)? But You need to add something else to work with OD that isn't there?
(I've noticed that in ODEDIT, many use only 3-4 commands out of 35!)

 


-- Alexander, private person, pacifist, english only with translator 🙂 --

Object-modeling _ odclass-odedit.com _ Help

0 Likes
Message 4 of 6

Anonymous
Not applicable

Thanks for the tips!

 

The solution is indeed the use of 

(setvar "cmddia" ade_cmddia_before_qry)

After using any ADE_OD commands run

 

as I have mention before

 

Regards.

0 Likes
Message 5 of 6

АлексЮстасу
Advisor
Advisor

What tasks do you want to solve with your Lisp?


(I think that, perhaps, we in ODEDIT, ODCLASS made a lot of unnecessary commands. But the necessary actions are not done...)

 


-- Alexander, private person, pacifist, english only with translator 🙂 --

Object-modeling _ odclass-odedit.com _ Help

0 Likes
Message 6 of 6

Anonymous
Not applicable

I'm using ADE_OD to add attributes to polylines and later this attributes will be exported using mapexport, Feature Class and Select Attributes to be used on Infraworks.

That's  not an issue anymore, it was solved. 

Now, I am struggling to integrate Sqlite database wih Autolisp.

Thanks again!

0 Likes