Author Topic: AutoCAD freezes when loading and testing ADE functions  (Read 937 times)

0 Members and 1 Guest are viewing this topic.

dubb

  • Swamp Rat
  • Posts: 1105
AutoCAD freezes when loading and testing ADE functions
« on: October 15, 2022, 01:05:19 PM »
I am testing ADE functions in VLISP. I noticed alot of times when I load the scripts. It will freeze and I would have to restart AutoCAD. Is there something I need to put in the code that will prevent it from doing this?
Code: [Select]
; Define new table
(setq tabldefn
    '(("tablename" . "EQTABLE") 
       ("tabledesc" . "EQUIPMENT TABLE")
       ("columns"
            ; EQ NAME COLUMN
            (("colname" . "EQ NAME")
             ("coldesc" . "EQ EQUIPMENT NAME") 
             ("coltype" . "character")
             ("defaultval" . "<EQ NAME>"))
;EQ TABLE ID
            (("colname" . "EQ REF ID")
             ("coldesc" . "EQ REFERENCE ID") 
             ("coltype" . "character")
             ("defaultval" . "<EQ REF ID>"))
;EQ DESCRIPTION
            (("colname" . "EQ DESC")
             ("coldesc" . "EQ DESCRIPTION") 
             ("coltype" . "character")
             ("defaultval" . "<EQ DESC>"))
 )))
; Create the new table
(ade_oddefinetab tabldefn)

dubb

  • Swamp Rat
  • Posts: 1105
Re: AutoCAD freezes when loading and testing ADE functions
« Reply #1 on: October 15, 2022, 01:59:09 PM »
My code had errors.
My data format for "colname" was invalid
I wrapped the code into a defun and it worked without freezing. I guess I fixed it myself.

dubb

  • Swamp Rat
  • Posts: 1105
Re: AutoCAD freezes when loading and testing ADE functions
« Reply #2 on: October 15, 2022, 02:12:54 PM »
Why does autocad hangup or freeze when I use this code?
Code: [Select]
(defun foo()
(ade_odtablelist)
  )