Another cloud routine not working in 2022

Another cloud routine not working in 2022

sdvannelli
Enthusiast Enthusiast
481 Views
1 Reply
Message 1 of 2

Another cloud routine not working in 2022

sdvannelli
Enthusiast
Enthusiast

Similar to another post, I also have a revision cloud routine I have had since the 90s and this is the first release where it has not worked. The routine actually seems to work, but while it is drawing the cloud, it visually does not show it. When you hit "C" to close it, all of a sudden it shows up. But it is not visible until that point. Please feel free to try this on both 2021 and 2022 and see if it happens. And if so, any ideas on what I need to change for it to work on 2022?

 

(defun C:Rca (/ m:OM m:OER m:P1 m:P2 m:PL m:CLS m:ANG m:CNT
m:DST m:SC m:OSM m:REVNUM m:LYR m:NEWLAY m:PLACETAG)

(setvar "CMDECHO" 0)
(setq m:OM (getvar "ORTHOMODE"))
(setq m:OSM (getvar "OSMODE"))
(setvar "OSMODE" 0)
(setq m:REVNUM (getstring "\nEnter the revision set: "))
(setq m:LYR (getvar "CLAYER"))
(setq m:OER *error*)
(defun *error* (s)
(setvar "ORTHOMODE" m:OM)
(setvar "CLAYER" m:LYR)


(princ (strcat "\Exit..." s))
(if m:OER (setq *error* m:OER))
(princ))

(setvar "ORTHOMODE" 0)
(setvar "apbox" 0)


(setq m:NEWLAY (strcat "REVCLOUD_" m:REVNUM))

(if (null (tblsearch "LAYER" m:NEWLAY))
(command "._layer" "new" m:NEWLAY "c" "3" m:NEWLAY "s" m:NEWLAY "")
(setvar "CLAYER" m:NEWLAY))


(setq m:P1 (getpoint "\nFrom Point: ")
m:SC (GETVAR "cannoscalevalue")
m:CNT 0
m:PL (list (list m:CNT m:P1)))

(if m:P1 (command "._pline" m:P1 "A"))
(while m:P1
(if (/= m:CNT 0)
(progn
(initget "Undo Close")
(setq m:P2 (getpoint m:P1 "\nUndo/Close/<Endpoint>: "))
(cond ((= m:P2 "Close")
(setq m:CLS "Close"
m:P2 (cadr (last m:PL))))
((= m:P2 "Undo")
(repeat (car (nth 0 m:PL)) (command "u"))
(setq m:PL (cdr m:PL))
(setq m:CNT (car (nth 0 m:PL))
m:P1 (cadr (nth 0 m:PL)))
(if (= m:CNT 0) (command "A")))
((= m:P2 nil)
(command "W" "0.0" "0.0" "")
(setq m:P1 nil))
)
)
(setq m:P2 (getpoint m:P1 "\nEndpoint: "))
)
(if (= (type m:P2) 'LIST)
(progn
(setq m:ANG (angle m:P1 m:P2)
m:CNT (/ (distance m:P1 m:P2) (/ 0.5 m:SC)))
(cond ((and (>= m:CNT 1.0) (< m:CNT 2.0))
(setq m:CNT 2))
((< m:CNT 1.0)
(setq m:CNT 1))
(T
(setq m:CNT (fix m:CNT)))
)
(setq m:DST (/ (distance m:P1 m:P2) m:CNT))
(repeat m:CNT
(command "w" "0.0" "0.0" "S"
(polar
(polar m:P1 m:ANG (/ m:DST 2.0))
(- m:ANG 1.57) (/ m:DST 4.0)
)
(setq m:P1 (polar m:P1 m:ANG m:DST))
)
)
(setq m:PL (cons (list m:CNT m:P2) m:PL))
(if (= m:CLS "Close")
(progn
(command "W" "0.0" "0.0" "")
(setq m:P1 nil)
)
)
)
)
)



(setq m:PLACETAG (getpoint "\nPlace the cloud's tag: "))
(command "._insert" "cloudtag-anno" m:PLACETAG "1" "" "0" m:REVNUM)


(setvar "ORTHOMODE" 0)
(command "move" "l" "" PAUSE)
(setvar "CLAYER" m:LYR)
(setvar "OSMODE" m:OSM)
(setvar "apbox" 1)

 


(princ)

)

 

0 Likes
482 Views
1 Reply
Reply (1)
Message 2 of 2

pendean
Community Legend
Community Legend
See other post and good guesses on why the fix may be up to Autodesk and a future update.

Would be worth reporting to Autodesk through your Accounts Page at this stage.
0 Likes