Community
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
michi <ishii@birdair.com>
wrote in message
href="news:FAFAA35CD8A6DEF6C98193C9B3514876@in.WebX.maYIadrTaRb">news:FAFAA35CD8A6DEF6C98193C9B35......
I posted before about this item but problem
happened.
As some of guys suggested, I set viewport ID to
systemvariable ("cvport") but Autocad crashed by following
routine.
This code worked when I run the layout for the
first time but When I switched model space,back to layout again ,and then run
this code,
Acad crashed.
Error Messages is "INTERNAL ERROR:!
href="mailto:Scandr.cpp@1117.eLockViolation">Scandr.cpp@1117.eLockViolation"
Any suggestion will be
appreciated.
size=2>
thanks,
size=2>
Michi
(defun C:AdjustPVport ( / )
;find display object
(setq SS
(ssget "X" '( (-4 . "<AND") (0 . "VIEWPORT") (8 . "VPORT") (-3
("Lug-Plate")) (-4 . "<NOT") (69 . 1) (-4 . "NOT>") (-4 . "AND>")
)))
(command "mspace")
(setq INDEX 0)
(repeat (sslength ss)
(setq ENAME (ssname SS
INDEX))
(setq ELIST (entget ENAME
'("Lug-Plate")))
(setq VportID (cdr (assoc 69
ELIST)))
(setvar "cvport" VportID)
(setq LugName (CDR (NTH 1 (CDADR (ASSOC -3 ELIST))))
)
(setq VPscale (CDR (NTH 2 (CDADR (ASSOC -3
ELIST)))) )
(setq CenterX (CDR (NTH 3 (CDADR
(ASSOC -3 ELIST)))) )
(setq CenterY (CDR (NTH 4
(CDADR (ASSOC -3 ELIST)))) )
(setq CenterP (list CenterX
CenterY))
;activate and adjust
scale
(command "mspace")
(command
"ucs" "r" lugname)
(command "plan"
"c")
(command "zoom" "scale" (strcat (rtos (/ 1 VPscale)
2 10) "XP"))
(command "zoom" "c" CenterP
"")
(setq INDEX (1+ INDEX))
)
(command "pspace")
(princ)
)
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
michi <ishii@birdair.com>
wrote in message
href="news:FAFAA35CD8A6DEF6C98193C9B3514876@in.WebX.maYIadrTaRb">news:FAFAA35CD8A6DEF6C98193C9B35......
I posted before about this item but problem
happened.
As some of guys suggested, I set viewport ID to
systemvariable ("cvport") but Autocad crashed by following
routine.
This code worked when I run the layout for the
first time but When I switched model space,back to layout again ,and then run
this code,
Acad crashed.
Error Messages is "INTERNAL ERROR:!
href="mailto:Scandr.cpp@1117.eLockViolation">Scandr.cpp@1117.eLockViolation"
Any suggestion will be
appreciated.
size=2>
thanks,
size=2>
Michi
(defun C:AdjustPVport ( / )
;find display object
(setq SS
(ssget "X" '( (-4 . "<AND") (0 . "VIEWPORT") (8 . "VPORT") (-3
("Lug-Plate")) (-4 . "<NOT") (69 . 1) (-4 . "NOT>") (-4 . "AND>")
)))
(command "mspace")
(setq INDEX 0)
(repeat (sslength ss)
(setq ENAME (ssname SS
INDEX))
(setq ELIST (entget ENAME
'("Lug-Plate")))
(setq VportID (cdr (assoc 69
ELIST)))
(setvar "cvport" VportID)
(setq LugName (CDR (NTH 1 (CDADR (ASSOC -3 ELIST))))
)
(setq VPscale (CDR (NTH 2 (CDADR (ASSOC -3
ELIST)))) )
(setq CenterX (CDR (NTH 3 (CDADR
(ASSOC -3 ELIST)))) )
(setq CenterY (CDR (NTH 4
(CDADR (ASSOC -3 ELIST)))) )
(setq CenterP (list CenterX
CenterY))
;activate and adjust
scale
(command "mspace")
(command
"ucs" "r" lugname)
(command "plan"
"c")
(command "zoom" "scale" (strcat (rtos (/ 1 VPscale)
2 10) "XP"))
(command "zoom" "c" CenterP
"")
(setq INDEX (1+ INDEX))
)
(command "pspace")
(princ)
)