Author Topic: Script verus Macros  (Read 1426 times)

0 Members and 1 Guest are viewing this topic.

MSTG007

  • Gator
  • Posts: 2601
  • I can't remeber what I already asked! I need help!
Script verus Macros
« on: November 11, 2015, 07:08:26 AM »
Got a quick question here. I am trying to figure out how to save out a file within an automated macro. Basically, I have the macro/ script do a few things, then I want to save it to a file where I can choose where to place it with a file name, then do some more things to the drawing; save out the file; etc. (Something like that). Is this possible with either a script or a macro? thanks guys
Civil3D 2020

tombu

  • Bull Frog
  • Posts: 289
  • ByLayer=>Not0
Re: Script verus Macros
« Reply #1 on: November 11, 2015, 07:48:20 AM »
Sure, if you're talking AutoCAD commands the saveas would have to be the last one.  You would need to put a save in before that or loose the work you've done in the current drawing.  You could use lisp in the macro/script to do it with functions as well.

Post what you have and everything you want it to do.
Tom Beauford P.S.M.
Leon County FL Public Works - Windows 7 64 bit AutoCAD Civil 3D

MSTG007

  • Gator
  • Posts: 2601
  • I can't remeber what I already asked! I need help!
Re: Script verus Macros
« Reply #2 on: November 11, 2015, 08:16:10 AM »
For instance, You start with a new drawing, it inserts the details, then save as (hopefully), then erase the previous details and insert new details. etc.

Code: [Select]
filedia
0
._-i;"C:/SILT_FENCE";16.5,4.44;1;1;0
._-i;"C:/DROP_IN_INLET";2.58,10.46;1;1;0

_saveas

erase
previous


._-i;"C:/SILT_FENCE_INLET";17.49,7.60;1;1;0
._-i;"C:/TEMP_SEED";1.56,9.73;1;1;0

_saveas

erase
previous



._-i;"C:/EROS_CONT_BLANKET";0.67,10.28;1;1;0
._-i;"C:/RIPRAP_OUTLET";17.71,0.20;1;1;0

_saveas

erase
previous


._-i;"C:/CONCRETE_WASHOUT";1.25,2.29;1;1;0
._-i;"C:/GRAVEL_CONST_ENT";22.82,10.29;1;1;0
._-i;"C:/ROCK_DONUT";0.72,24.07;1;1;0

_saveas

erase
previous



filedia
1
Civil3D 2020