mit Posted November 6, 2016 Share Posted November 6, 2016 Hello everyone I have some problem about this lisp code I want to attch DWG file to autocad map 3d when I run code it was prompt this error This is a error prompt: >>Command: LLMS_ATTACH_CHAN >>Querying from M:\LLMS_CAD\Parcels\Chanthaboury.dwg ... >>Executing property query...done. >>Executing location query...done. >>Displaying queried objects... >>611 object(s) have been queried.Unknown command "LLMS_ATTACH_CHAN". Press F1 for help. This is my code: (defun c:LLMS_ATTACH_CHAN (/ ade_cmddia_before_qry echo ortho dwgname dwg_id) ;store system variables (setq ade_cmddia_before_qry (getvar "cmddia")) (setq echo (getvar "CMDECHO")) (setq ortho (getvar "ORTHOMODE")) ;set system variables (setvar "cmddia" 0) (setvar "CMDECHO" 0) (setvar "ORTHOMODE" 1) (ade_projsetwscode "UTM84-48N") (setq dwgname "M:\\LLMS_CAD\\Parcels\\Chanthaboury.dwg") (if (/= nil dwgname) (progn (setq dwg_id (ade_dsattach dwgname)) (ade_dwgactivate dwg_id) (ade_qryclear) (ade_qrysetaltprop nil) (ade_qrydefine '("" "" "" "Location" ("all" )"")) (ade_qrysettype "draw") (ade_qrydefine '("AND" "" "" "property" ("layer" "=" "Chanthaboury") "" )) (ade_qryexecute) (ade_qryclear) (command "_zoom" "e" "") ) (alert "Can't attach the drawing") ) ;restore system variables (setvar "cmddia" ade_cmddia_before_qry) (setvar "CMDECHO" echo) (setvar "ORTHOMODE" ortho) (princ) ) Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted November 6, 2016 Share Posted November 6, 2016 Change: (command "_zoom" "e" "") to: (command "_zoom" "_e") Quote Link to comment Share on other sites More sharing options...
mit Posted November 6, 2016 Author Share Posted November 6, 2016 That's true Thank you Lee Mac Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted November 6, 2016 Share Posted November 6, 2016 You're welcome. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.