Jump to content

How to do this - macro or script?


Recommended Posts

Hello

 

I have several DWG's I'd like to make some changes to. I've tried Autoscript (the freeware) but I can't even make it draw a circle without errors.

 

What I would like to do is the following:

 

  • select all
  • move selection from specified point to specified point
  • if possible: set -dwgunits to meter
  • purgeall
  • save as DWG 2010
  • close

 

Anyone who can point me in the right direction on this one? What's the easiest way? I'm using AutoCAD Civil3D 2011.

 

Thanks!

Link to comment
Share on other sites

or am i being too simple?

select
all
move
0,0,0
[insert new point here]
-units
[insert preferences here]
-purge
all

y
saveas

Edited by designerstuart
forgot to purge
Link to comment
Share on other sites

Like above in a script re units you can set the individual parts via a setvar without having to do all.

 

example (SETVAR "LUNITS" 2)

 

Also add "Open dwgname" to start and after saveas "dwgname close" just repeat as many times as required changing dwgname, start script in any dwg.

 

you can also do lisp in your script so could ask for new pt each time

 

open dwgname
select
all
move
0,0,0
(setq pt (getpoint))
!pt
(SETVAR "LUNITS" 2)
-purge
all

y
saveas dwgname2
close

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...