View Full Version : Title Block and Paperspace don't like each other.
jeff.garr
2006-03-16, 12:29 PM
We are have an issue with directly inserting our TTB into paperspace. Our CAD manager has created a custom pull down menu with preset sizes for TTB's, revision blocks, section arrows, basic notes, etc. There is no problem inserting the TTB into modelspace only paperspace is an issue. Here is the error we get with this:
Command: (SETVAR "USERR1" 1.0) 1.0
Command: (LOAD "I:/DESIGN GROUP/ACDWGFIL/LISP/RPS0E48B") C:E48-BUILDING
Command: E48-BUILDING ; error: AutoCAD variable setting rejected: "LIMMAX"
(48.0 34.0)
The above example is 1:1 and I have set-up through the "Page Setup Manager" a scale of 1:1. This has been an issue since we started using paperspace with ACAD 2002. We have to drop the block into modelspace and then cut and paste into paperspace. Any thought out there as to why this is occurring?
Mike.Perry
2006-03-16, 02:47 PM
<SNIP>
Command: (SETVAR "USERR1" 1.0) 1.0
Command: (LOAD "I:/DESIGN GROUP/ACDWGFIL/LISP/RPS0E48B") C:E48-BUILDING
Command: E48-BUILDING ; error: AutoCAD variable setting rejected: "LIMMAX"
(48.0 34.0)
<SNIP>Hi
Open up the LISP routine "RPS0E48B" and look at the portion of code that contains LimMax.
Below is extracted from the AutoCAD Online Help File [F1]....
LIMMAX is read-only when paper space is active and the paper background or paper margins are displayed.Have a good one, Mike
jeff.garr
2006-03-16, 02:55 PM
Mike-
Here is the lisp. Not sure what "LIMMAX is read-only when paper space is active and the paper background or paper margins are displayed." means??
(defun C:E48-SIZE (/ sca sblip scmde sareq sadia)
; save system variables
(setq sblip (getvar "BLIPMODE"))
(setq scmde (getvar "CMDECHO"))
(setq sareq (getvar "ATTREQ"))
(setq sadia (getvar "ATTDIA"))
; change system variables
(setvar "BLIPMODE" 0)
(setvar "CMDECHO" 0)
(setvar "LIMCHECK" 0)
; use this instead of COMMAND function, 0 sets LIMITS off
(setvar "ATTREQ" 0) ; turn off prompting for Attributes
(setvar "ATTDIA" 0) ; turn off Attribute dialog box
(setq sca (setvar "DIMSCALE" (getvar "USERR1")))
; set sca variable and DIMSCALE at same time
; (command "limits" "off")
(setvar "LIMMAX"
(list (* (getvar "USERR1") 48.0) (* (getvar "USERR1") 34.0))
)
(setvar "LIMMIN" (list (* sca 0.0) (* sca 0.0)))
; (setq in1 (list (* 0.0 (GETVAR "USERR1")) (* 0.0 (GETVAR "USERR1"))))
(setvar "USERR2" (* sca 0.150))
(setvar "LTSCALE" (* 0.5 sca))
(command "._insert" "E48" "0.0,0.0" sca sca 0)
; hardcode 0,0 insertion point
; (command "dim" "dimscale" (GETVAR "USERR1") ^C)
(command "._zoom" "a")
(command "._ddatte" "last") ; edit attributes with dialog box
; reset system variables
(setvar "BLIPMODE" sblip)
(setvar "CMDECHO" scmde)
(setvar "ATTREQ" sareq)
(setvar "ATTDIA" sadia)
(princ) ; print nil
)We typically have just used the TTB in modelspace in the past and it really was no big deal, but now we seem to use it all the time and it is getting old. Thanks for your help.
[ Moderator Action = ON ] What are [ CODE ] tags... (http://forums.augi.com/misc.php?do=bbcode#code) [ Moderator Action = OFF ]
Mike.Perry
2006-03-16, 03:15 PM
Here is the lisp. Not sure what "LIMMAX is read-only when paper space is active and the paper background or paper margins are displayed." means??It means LimMax and_or LimMin can not be set in Paperspace via SetVar.
Try commenting out the relevant part of the code ( shown in blue, below )...
(defun C:E48-SIZE (/ sca sblip scmde sareq sadia)
; save system variables
(setq sblip (getvar "BLIPMODE"))
(setq scmde (getvar "CMDECHO"))
(setq sareq (getvar "ATTREQ"))
(setq sadia (getvar "ATTDIA"))
; change system variables
(setvar "BLIPMODE" 0)
(setvar "CMDECHO" 0)
(setvar "LIMCHECK" 0)
; use this instead of COMMAND function, 0 sets LIMITS off
(setvar "ATTREQ" 0) ; turn off prompting for Attributes
(setvar "ATTDIA" 0) ; turn off Attribute dialog box
(setq sca (setvar "DIMSCALE" (getvar "USERR1")))
; set sca variable and DIMSCALE at same time
; (command "limits" "off")
; (setvar "LIMMAX"
; (list (* (getvar "USERR1") 48.0) (* (getvar "USERR1") 34.0))
; )
; (setvar "LIMMIN" (list (* sca 0.0) (* sca 0.0)))
; (setq in1 (list (* 0.0 (GETVAR "USERR1")) (* 0.0 (GETVAR "USERR1"))))
(setvar "USERR2" (* sca 0.150))
(setvar "LTSCALE" (* 0.5 sca))
(command "._insert" "E48" "0.0,0.0" sca sca 0)
; hardcode 0,0 insertion point
; (command "dim" "dimscale" (GETVAR "USERR1") ^C)
(command "._zoom" "a")
(command "._ddatte" "last") ; edit attributes with dialog box
; reset system variables
(setvar "BLIPMODE" sblip)
(setvar "CMDECHO" scmde)
(setvar "ATTREQ" sareq)
(setvar "ATTDIA" sadia)
(princ) ; print nil
)Have a good one, Mike
Mike.Perry
2006-03-16, 03:18 PM
Hi Jeffrey
Please note I have *moved* this thread from the AutoCAD Customization (http://forums.augi.com/forumdisplay.php?f=118) forum to this one...
Why? - I believe you will receive better help here in the AutoLISP forum.
Thanks, Mike
Forum Moderator
Mike.Perry
2006-03-16, 03:51 PM
It means LimMax and_or LimMin can not be set in Paperspace via SetVar.Hi
:Oops: Of course the above should have read something like ( addition in blue )...
It means LimMax and_or LimMin can not be set in Paperspace via SetVar when Paperspace is active and the Paper Background or Paper Margins are displayed.
Have a good one, Mike
jeff.garr
2006-03-16, 03:57 PM
It means LimMax and_or LimMin can not be set in Paperspace via SetVar.
Try commenting out the relevant part of the code ( shown in blue, below )...
(defun C:E48-SIZE (/ sca sblip scmde sareq sadia)
; save system variables
(setq sblip (getvar "BLIPMODE"))
(setq scmde (getvar "CMDECHO"))
(setq sareq (getvar "ATTREQ"))
(setq sadia (getvar "ATTDIA"))
; change system variables
(setvar "BLIPMODE" 0)
(setvar "CMDECHO" 0)
(setvar "LIMCHECK" 0)
; use this instead of COMMAND function, 0 sets LIMITS off
(setvar "ATTREQ" 0) ; turn off prompting for Attributes
(setvar "ATTDIA" 0) ; turn off Attribute dialog box
(setq sca (setvar "DIMSCALE" (getvar "USERR1")))
; set sca variable and DIMSCALE at same time
; (command "limits" "off")
; (setvar "LIMMAX"
; (list (* (getvar "USERR1") 48.0) (* (getvar "USERR1") 34.0))
; )
; (setvar "LIMMIN" (list (* sca 0.0) (* sca 0.0)))
; (setq in1 (list (* 0.0 (GETVAR "USERR1")) (* 0.0 (GETVAR "USERR1"))))
(setvar "USERR2" (* sca 0.150))
(setvar "LTSCALE" (* 0.5 sca))
(command "._insert" "E48" "0.0,0.0" sca sca 0)
; hardcode 0,0 insertion point
; (command "dim" "dimscale" (GETVAR "USERR1") ^C)
(command "._zoom" "a")
(command "._ddatte" "last") ; edit attributes with dialog box
; reset system variables
(setvar "BLIPMODE" sblip)
(setvar "CMDECHO" scmde)
(setvar "ATTREQ" sareq)
(setvar "ATTDIA" sadia)
(princ) ; print nil
)Have a good one, Mike
That worked! All this time and that little change made a world of difference. As always, thanks for the help!!!
vBulletin® v3.6.7, Copyright ©2000-2009, Jelsoft Enterprises Ltd.