PDA

View Full Version : Linetype Scale settings for all layouts routine not quite right


martins.183886
2009-03-23, 09:40 PM
I have used this lisp routine to reset my linetype scale settings hoping it would change the settings for ALL of my layouts at once, but it only works on one layout. We use many layouts and would like to change them all at once (example: older drawings)

What needs to be changed in the following routine that would get the results I need? Is what I am asking for possible?

Thank you,

Shelley

;sets msltscale, ltscale & psltscale=1 for all layouts

(defun c:layoutltscale ( / lay ct)
(setq ct (getvar "ctab"))
(setvar "ltscale" 1)
(setvar "msltscale" 1)
(foreach lay (layoutlist)(command "_layout" "_Set" lay "_mspace" "psltscale" 1))
(setvar "ctab" ct)

RobertB
2009-03-24, 12:34 AM
I don't think you need to go thru each layout. Each system variable changed by this routine is stored in the drawing, not per layout.

However, I do not see a RegenAll anywhere.

buddeal4
2009-03-24, 01:30 PM
I agree; the variables you're changing are saved to the drawing, not just the layout tab.

Instead, just try this:

;sets msltscale, ltscale & psltscale=1 for all layouts

(defun c:layoutltscale ( / lay ct)
(command "regenauto" "on")
(setvar "ltscale" 1)
(setvar "msltscale" 1)
(setvar "psltscale" 1)



Also, if you have a customized drawing template for your company's use, make sure that these variables are set to this desired standard in the .DWT file. That way, any new drawings created using this template will already be set with these defaults.
Hope that helps!
~Buddy

lpseifert
2009-03-24, 07:56 PM
Psltscale needs to be changed in each layout tab, it isn't a 'global' variable.

martins.183886
2009-03-24, 08:42 PM
I don't think you need to go thru each layout. Each system variable changed by this routine is stored in the drawing, not per layout.

However, I do not see a RegenAll anywhere.

I have noted the lack of RegenAll, thank you :)

I should have clarified in my post, as far as changing the system variable per layout, as I understand, Psltscale needs to be changed in each layout tab.
I have tried the routine buddea14 submitted, and the psltscale variable still requires changing per layout.

martins.183886
2009-03-24, 08:47 PM
Thank you for your responses RobertB, lpseifert, and buddea14.

RobertB
2009-03-26, 08:59 PM
... Psltscale needs to be changed in each layout tab.You are correct. The system variable documentation misled me into thinking the variable was only drawing-specific, not layout-specific.