Jump to content

Where can I get a comprehensive list of script commands?


Recommended Posts

Posted

Hi,

 

One of them is to e-mail drawings to our clients but my boss doesn't want to send them the blocks we drew so I have to do the following for every drawing.

 

1) Freeze the Multileader layer (the numbers disappear and turn into some text whenever I explode them so I have to freeze this layer. Any idea why?)

 

2) Select All

 

3) Explode (I explode it 2-3 times)

 

4) Select everything on 2-3 Layers only and block those and disable "Allow Exploding".

 

5) Save.

 

I googled a little and found zero resources on the list of commands. I did find one but it didn't really help.

 

I just came up with this...

 

LAYER

K-Numbering

F

SELECT

ALL

EXPLODE

SELECT

ALL

EXPLODE

PURGE

QSAVE

 

Ran it, didn't do anything, figured as much since I pretty much threw those commands in there, hehe.

 

Anyway, which book or site would have a list of commands I could "pluck" and use in the text file?

 

I'm assuming an AutoCAD script is just a sequential list of commands like the above without all the ++ -- {} syntax? If so, it shouldn't be too hard right?

Posted

you won't find a list of script commands as pretty much every AutoCAD command that works in the command line will work in a script. The exception being SOME dialogue based commands. To write a script you need notepad and type the command in full along on a new line and supply the requested reply to each question on a new line. A blank line can be used to accept the default. I finish my scripts with a RESUME command as sometimes you get an extra blank line at the end which will invoke the last completed command and could leave you inside that command. Once you have type everything save the file with a .scr extension. Run with the script command.

 

Here is an extract from our batch plot script

 

SDI
1
open
"p:\Design_Office\e106\HSM84397\JFD-6401\HSM84397-42-GA-0002-00.dwg"
plot
y
Model
[url="file://\\eugbhorfile001\EUGBHORPD001"]\\eugbhorfile001\EUGBHORPD001[/url]
A3
m
l
n
e
f
0,0
y
STL Mono.ctb
y
n
n
n
y
line
0,0
1,1
erase
l
open
y
"p:\Design_Office\e106\HSM84397\JFD-6401\HSM84397-42-GA-0002-01.dwg"
plot
y
<etc>

Posted

For Layer you will need to show

 

-layer
f
[k-numbering]

 

For the purge command in a script you will need to show it as

 

-purge
a
*
n

 

If you put an - in front of some commands that bring up dialogue boxes it runs the command as text only. Have a play to find out how they work. I'm a little busy at the moment but I'll have a play at lunch if no-one else has given you the answer!

Posted

it seems straightforward enough but I have trouble finding the commands for Freezing a Layer, Selecting All Objects within a layer, Exploding..

 

or do I need to follow your example? To select everything within a layer I do

 

QSELECT

TAB

TAB

L

TAB

K

 

edit: oops just saw the above reply, i'll have a go at adding a - in front.

Posted

OK try this

 

-la
S
[LAYER NAME YOU WANT TO WORK ON WITHOUT BRACKETS!]
F
*

EXPLODE
ALL
-PURGE
A
*
N

 

You need an extra enter after the last N to make it work and an enter after the first *.

 

You may need to put some extra enter in

Posted

Which is the equivalent of QSELECT ? _qselect and -qselect didnt work.

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...