ImportStylesandSettings to multiple drawings

ImportStylesandSettings to multiple drawings

emilio24DRY
Enthusiast Enthusiast
289 Views
4 Replies
Message 1 of 5

ImportStylesandSettings to multiple drawings

emilio24DRY
Enthusiast
Enthusiast

I work on the templates at my company. Each of our template sheets have all the same styles and settings. Is it possible to use the autocad command "ImportStylesandSettings" command on multiple drawings? I was thinking that the workflow would look something like below. I have ensured that the capitalization is correct in all the file paths.

 

1) Manually open "S:\Templates\Civil Templates\CAD Templates\08_Development\01_24X36\Styles.dwg"

2) Manually update the appropriate setting or style

Here is where the lisp routine would start:

3) Open the "S:\Templates\Civil Templates\CAD Templates\08_Development\01_24X36\01_BASE\D-PIPE.dwg"

(vla-open (vla-get-documents (vlax-get-acad-object)) "S:\Templates\Civil Templates\CAD Templates\08_Development\01_24X36\01_BASE\D-PIPE.dwg" :vlax-true)

4) Make this recently opened drawing the current drawing

I am not sure how to do this. The open command above switches back to the original drawing that I had open.

5) Run "ImportStylesandSettings" and update all styles and settings and select the "Styles.dwg" as the template 

(command "ImportStylesandSettings"...)
Not Sure how to select the "Styles.dwg", then push all settings and styles from a lisp routine for this command

6) 

(command "save")

7)

(command "close")

8) Open the next drawing: "S:\Templates\Civil Templates\CAD Templates\08_Development\01_24X36\02_ONSITE\C-0 TITLE SHEET.dwg"

9) Make this recently opened drawing the current drawing

10) (command "save")

11) (command "close")

12),etc -> repeat for all applicable drawings

 

Thanks!

0 Likes
290 Views
4 Replies
Replies (4)
Message 2 of 5

paullimapa
Mentor
Mentor

Since this is a Civil 3D command, I'm not sure there's a command line version where you can avoid the dialog window

ImportStylesandSettings

https://www.autodesk.com/support/technical/article/caas/sfdcarticles/sfdcarticles/How-to-copy-a-styl...

What happens at the command line when you enter a dash in front of the command: -IMPORTSTYLESANDSETTINGS

Do you still get the dialog window or can you enter the responses at the command line?

 


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 3 of 5

emilio24DRY
Enthusiast
Enthusiast

"-ImportStylesandSettings" doesn't work

0 Likes
Message 4 of 5

paullimapa
Mentor
Mentor

unless there's a way to implement this command using the command line, you won't be able to automate the process


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 5 of 5

paullimapa
Mentor
Mentor

What if you set filedia to 0 and cmddia to 0 and then enter command IMPORTSTYLESANDSETTINGS

https://forums.autodesk.com/t5/civil-3d-forum/import-styles-and-settings-not-working/m-p/6623897#M31...


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes