(defun dfn_cmd_canceld( / $rr cx dx ch)
(setq;|a6765|;
ch (quote INT)
cx "CMDACTIVE"
dx (getvar cx)
dx (if (/= (type dx) ch) 0 (boole 1 dx 1))) (progn (while (> dx 0) (setq;|a6901|;
dx (getvar cx)
dx (boole 1 dx 1)) (setq;|a6947|;
$rr (command "")))) (setq;|a6971|;
$rr (getvar "CMDNAMES")) (terpri)
$rr)
;;Bug: for autocad2007 you use command("");(setq winhelp "I insert before the execute explode or __.explode")
(dfn_cmd_canceld)
(vl-cmdf "explode" (car (entsel)))
(dfn_cmd_canceld)
(vl-cmdf "_.-explode" (car (entsel)))
(dfn_cmd_canceld)
(vl-cmdf "_.-ucs" "origin" (getpoint))
(dfn_cmd_canceld)
(command "_.-ucs" "origin" (getpoint))
is there a "special" system variable that handles this behaviour ?Always you must detect when "(setq vlc (vl-cmdf "explode" entity-name) )" Fail.
is there a "special" system variable that handles this behaviour ?For explode:
(setq *ThisDrawing* (vla-get-ActiveDocument (vlax-get-acad-object)))About UCS:
(setq *wcs* (vla-get-ActiveUCS *ThisDrawing*))
Automation Error. Null object ID
on the PC of my friend with ACAD2021 !
Why ?
Comando: (setq *ThisDrawing* (vla-get-ActiveDocument (vlax-get-acad-object)))
#<VLA-OBJECT IAcadDocument 0000000030d84668>
Comando: (setq *wcs* (vla-get-ActiveUCS *ThisDrawing*))
; errore: Errore di automazione. ID dell'oggetto Null.
Try: create a new UCS >>> WITH NAME then try again (setq *wcs* (vla-get-ActiveUCS *ThisDrawing*))...(setq origin(getpoint) )Does _.ucs command have _origin option?
(alert (itoa (getvar "cmdactive" ) ) ) ; [ it returns 0 ! ]
(command "ucs" "origin" origin)
AutoCAD command rejected: "ucs"
why ?
Command: _UCS
Current ucs name: *WORLD*
Specify origin of UCS or [Face/NAmed/OBject/Previous/View/World/X/Y/Z/ZAxis] <World>:
Try this code to change UCS origin:Try: create a new UCS >>> WITH NAME then try again (setq *wcs* (vla-get-ActiveUCS *ThisDrawing*))...
Prego :)QuoteTry: create a new UCS >>> WITH NAME then try again (setq *wcs* (vla-get-ActiveUCS *ThisDrawing*))...
Grazie Marco.
Does _.ucs command have _origin option?Can you test the "Expert"-variabile together ?"
(setq vars (list "CMDECHO")) (mapcar 'setvar vars '(0))
(command ".expert" (getvar "expert")) ;; dummy command
(vl-cmdf "_.pline" "_non" (getpoint)))
Does _.ucs command have _origin option?
Can you test the "Expert"-variabile together ?"
The "origin" request is implied in the prompt itself, probably the option is hidden for a backward compatibility issue…QuoteDoes _.ucs command have _origin option?QuoteCan you test the "Expert"-variabile together ?"
I took a look to the EXPERT system variable
It can be set to 0 until 5.
But never the UCS command shows the option "origin".
But it exists, works and is HIDDEN.
Nome UCS corrente: *GLOBALE*
Specificare origine dell'UCS o [Faccia/con NOme/OGgetto/Precedente/Vista/Globale/X/Y/Z/Asse-z] <Globale>: _origin
Specificare nuovo punto di origine <0,0,0>:
BricsCAD
: UCS
Specify origin of UCS or [Face/NAmed/Entity/Previous/View/X/Y/Z/Z Axis/Move/World] <World>:_origin
Origin point <0,0,0>
The "origin" request is implied in the prompt itself,
probably the option is hidden for a backward compatibility issue…