getting viewport scale crashes autocad...

Mark Dubbelaar

Usenet Archive
Joined
Jul 1, 2003
Messages
45
Reaction score
0
hi

i have been using the following code for a while now, and have found that every now and then it crashes autocad, i've think its somewhere in getting the assoc 41 or 45, but can't figure out where or why it is doing this... has anyone else had a similar problem / solution???

any help would be great

cheers

mark

;code
(setq SelectedObject
(entsel
"\nSelect viewport or Enter 'Bar Scale' scale: 1:"
)
)
(if (= (cdr (assoc 0 (entget (car SelectedObject)))) "VIEWPORT") (progn (setq VIEWPORTENTITY (entget (car SelectedObject))) (setq VIEWPORT_SCALE (/ (cdr (assoc 41 VIEWPORTENTITY)) (cdr (assoc 45 VIEWPORTENTITY)) ) ) ) ;progn (progn (setq VIEWPORTENTITY (entget (cdr (assoc 330 (entget (car SelectedObject))) ) ) ) (setq VIEWPORT_SCALE (/ (cdr (assoc 41 VIEWPORTENTITY)) (cdr (assoc 45 VIEWPORTENTITY)) ) ) ) ;progn ) ;if
 

Latest threads

Back
Top