Code Red > AutoLISP (Vanilla / Visual)

Is it possible to skip group command when in refedit.?

(1/4) > >>

MvdP:
Is it possible to bypass the group command in the follwing part of my routine when i am in a refedit.(** GROUP command not allowed during reference editing **)

--- Code: ---(defun h1 ()
(command "LAYER" "on" "z-arc" "")
(command "bhatch" "p" pat sca hk0 "s" "L" "" "")
(setq arcering (entlast))
(setq ed (entget arcering))   
  (setq ed (subst (cons 8 "00---0-a_Arceer") (assoc 8 ed) ed ))
  (entmod ed)
 
(setq groepgetal (rtos (getvar "CDATE") 2 9))
(setq groepnaam (substr groepgetal 10 9))

  (if (= arcx nil)
(progn
(command "-group" "c" groepnaam "" arcering omranding "")
  )
)

  (command "layer" "off" "z-arc" "")
(setq c (entlast))
(command "draworder" c "" "back")


)
--- End code ---

CADaver:
You could check for CMDACTIVE?  Won't be specifically REFEDIT, but if a command is active, skip the "group".

MvdP:
Thanks CADaver this is what i did.



--- Code: ---;hatches the poly-line
(defun h1 ()
(command "LAYER" "on" "z-arc" "")
(command "bhatch" "p" pat sca hk0 "s" "L" "" "")
(setq arcering (entlast))
(setq ed (entget arcering))   
  (setq ed (subst (cons 8 "00---0-a_Arceer") (assoc 8 ed) ed ))
  (entmod ed)
 
(setq groepgetal (rtos (getvar "CDATE") 2 9))
(setq groepnaam (substr groepgetal 10 9))

  (if (= arcx nil)
(progn
(command "-group" "c" groepnaam "" arcering omranding "")(while ( =1 (getvar "CMDACTIVE")))
  )
)

  (command "layer" "off" "z-arc" "")
(setq c (entlast))
(command "draworder" c "" "back")


)
--- End code ---

But it doesn't skip the group command what am i doing wrong here.?

MvdP:
Nobody.?

Kerry:
Where is the value for this being set ..

(if (= arcx nil)
....

NB: could use this

(if (not ARCX)
....

<standard code failure fixer 6A> make the variables local,

what happens then ...


... don't have time to look at your real problem ..
.. but, can you explain how you believe this works ..
      (progn
         (command "-group" "c" groepnaam "" arcering omranding "")(while ( =1 (getvar "CMDACTIVE")))
        )

Navigation

[0] Message Index

[#] Next page

Go to full version