AutoCAD Architecture Forum
Welcome to Autodesk’s AutoCAD Architecture Forums. Share your knowledge, ask questions, and explore popular AutoCAD Architecture topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MSLTSCALE Change in Multiple Drawings

16 REPLIES 16
Reply
Message 1 of 17
forseyc
730 Views, 16 Replies

MSLTSCALE Change in Multiple Drawings

Is there any way to change the msltscale variable to 1 and the scale to 1/4"=1'-0" in multiple drawings without opening each and doing it all manually?

Thanks for the help

16 REPLIES 16
Message 2 of 17
leothebuilder
in reply to: forseyc

Script

Message 3 of 17
forseyc
in reply to: leothebuilder

I've never used script.  Can you give me a little more info on it?

 

Thanks

Message 4 of 17
leothebuilder
in reply to: forseyc

If you are new to autocad scripting, there are script generators available on the internet.

Dotsoft has "Super Script" which cost 50 bucks and is well worth it. There are others as well.

Message 5 of 17
forseyc
in reply to: leothebuilder

Would a LISP routine be considered a script?  I see ACA incoprorates a LISP editor in the software.

Message 6 of 17
leothebuilder
in reply to: forseyc

Lisp is different from script, and what you need is a batch script that can open cad files, set the MSLTScale, save the file and close the file.

Do a search on Autodesk site for ScriptPro.

It would do what you want and is free (I think)

Message 7 of 17
forseyc
in reply to: leothebuilder

Great - I'll give that a try.  I tell you - its tough to manage all the houses we have and draw each one per customer selections and still try and improve my performance and keep up with technology and improve the standards of my department... When will the mayhem end for a single employee to handle all of this?  Come on economy!

Message 8 of 17
leothebuilder
in reply to: forseyc

Ohhh.....stop grumbling and get on with it !:smileyhappy !   🙂

 

By the way...don't forget to set the MSLTScale in your template file ! (ant any other setvars you want)

Message 9 of 17
forseyc
in reply to: leothebuilder

Great!  Script Pro is free and works great.

 

Here was my script:

 

CTAB
MODEL
MSLTSCALE
1
CANNOSCALE
1/4" = 1'-0"
_zoom
_extents
_qsave
_close

 

The only thing I want to change now is to be able to switch layout tabs and zoom extents in each - from my research it looks like I'll have to do some LISP routine - which I don't know how to do....

Message 10 of 17
leothebuilder
in reply to: forseyc

TILEMODE = 0 sets the environment to Paper Space.

TILEMODE = 1 sets the environment to Model Space.

 

This should work in a script.

Message 11 of 17
forseyc
in reply to: leothebuilder

I have more than one paper or layout tab though...

Message 12 of 17
leothebuilder
in reply to: forseyc

Well, heck......if you know the name of the tab that you want to set current......and if all your drawing files are the same and have the same layout tab name that could work with a lisp. But if they all vary because of the layout name I don't think it can work. Too many variables.

 

You can change to layout tab with the command CTAB followed by "layout name".

Message 13 of 17
forseyc
in reply to: leothebuilder

Wow - I think I figured it out with a little more research.

 

It appears you can put LISP into a script.  Here is what my script looks like:

 

CTAB
MODEL
MSLTSCALE
1
CANNOSCALE
1/4" = 1'-0"
_zoom
_extents
(foreach x (layoutlist)
(setvar "ctab" x)
(command "_.zoom" "_extents"))
CTAB
MODEL
_qsave
_close

 

I found the (foreach x (layoutlist) - (setvar "ctab" x) - (command "_.zoom" "_extents"))  lisp routine on another website and simply inserted it into the script.  I guess that command finds and lists each layout then zooms to extents for each.

 

i then set it to go to the model tabe and save.  Now to test on multiple drawings.

Message 14 of 17
leothebuilder
in reply to: forseyc

Great....am glad you got it working.

Message 15 of 17
forseyc
in reply to: leothebuilder

I had a little problem with some layout tabs.  The viewport within the layout was active, that is you were in model space in the viewport.  The script would then make the viewport zoom to extents insead of the layout itself.  I therefore added the following command in red:

 

...

(foreach x (layoutlist)
(setvar "ctab" x)
(command "_.pspace")
(command "_.zoom" "_extents"))

...

 

Works great and no errors on Scriptpro.

Message 16 of 17
leothebuilder
in reply to: forseyc

Wow...yesterday you didn't know anything about scripting.

 

Now you're an expert as scripting as well as Lisp !!

 

Again....am glad you got it to work for you.

Message 17 of 17
3dwannab
in reply to: forseyc

You could add more to your script to help maintain clean drawings.

What 'LTPSMSCELTCANNO_1.lsp' does (It's my 1st LISP too, I only started LISPING yesterday )
; Sets LTSCALE, PSLTSCALE, MSLTSCALE (All layouts: Zoom extents and regens each), CELTSCALE to one.
; Sets CANNOSCALE to "1:1" (Metric only).
; Goes to model space (won't be annoying if you setup this lisp to run once you open the drawing, see bottom of script) (can be disabled by placing ; before the line).
; Regens all.

 

Just helping a fello noob out 🙂

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost