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
I've never used script. Can you give me a little more info on it?
Thanks
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.
Would a LISP routine be considered a script? I see ACA incoprorates a LISP editor in the software.
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)
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!
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)
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....
TILEMODE = 0 sets the environment to Paper Space.
TILEMODE = 1 sets the environment to Model Space.
This should work in a script.
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".
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.
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.
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.
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.