Dear All,
I need to check whether a boundary can be created or not. I have write the following conventional code and it returns the error.
(if (not (vl-cmdf "-boundary" "a" "O" "P" "" P1 ""))
(setq adj-panel-list (list ""))
(setq adj-panel-list nil)
);if
Is there any way to use the boundary command?
Thanks
STM
Solved! Go to Solution.
Solved by hmsilva. Go to Solution.
Something like this perhaps
(setq lstobj (entlast)) (vl-cmdf "-boundary" "a" "O" "P" "" P1 "") (if (not (eq lstobj (entlast))) (prompt "\nThe boundary was created!") (prompt "\nThe boundary was not created!") )
HTH
Henrique
Something like this should work .
(setq e (entlast) done nil ) (vl-cmdf "-boundary" "a" "O" "P" "" P1 "") (if (and (/= (setq x (entlast)) e) (wcmatch (cdr (assoc 0 (entget x))) "*POLYLINE")) (setq done T) (setq done nil) )
@_Tharwat wrote:
Something like this should work .
(setq e (entlast) done nil ) (vl-cmdf "-boundary" "a" "O" "P" "" P1 "") (if (and (/= (setq x (entlast)) e) (wcmatch (cdr (assoc 0 (entget x))) "*POLYLINE")) (setq done T) (setq done nil) )
Hi Tharwat,
are you sure that the return from (/= (setq x (entlast)) e) is the correct one?
It will return always T, and (= (setq x (entlast)) e) It will return always nil... Perhaps something like (not (eq (setq x (entlast)) e))...
Cheers
Henrique
@hmsilva wrote:Hi Tharwat,
are you sure that the return from (/= (setq x (entlast)) e) is the correct one?
It will return always T, and (= (setq x (entlast)) e) It will return always nil... Perhaps something like (not (eq (setq x (entlast)) e))...
Cheers
Henrique
You're right henrique .
I guess yesterday or before yesterday I faced the same issue and was shocked with the wrong return of the operator /= and leave it without being convinced how could that be , but now you did clarify it very well .
Thank you .