How can I program into a script routine "Escape"? I want it so part way through my routine, in this case an insertion of a block, the system will escape.
|
|
|
How can I program into a script routine "Escape"? I want it so part way through my routine, in this case an insertion of a block, the system will escape.
Use some unknown "command", such as "Burp". e.g.
._Open
MyFile
._-Layer _set 0
Burp
._-Insert …
I can't get this to work.
I want to redefine a block (and be able to run Scriptpro).
This is what I get:
SCRIPT
Command: -insert
Enter block name or [?] <a2>: a2= Block "a2" redefined (this is where I want it to Esc)
Specify insertion point or [Basepoint/Scale/X/Y/Z/Rotate]:
I tried putting in a "nonsense" command, (several different ways) but it was totally ignored. All it does is keep asking for insertion point...very persistent!
I've tried running through the whole command, inserting "@", accepting the defaults, then initiating Erase, Last, which works fine for basic blocks, but not for blocks with attributes. Any text in the script following the last enter of the insert command, gets entered as the attributes. (DWG _Number becomes "erase", DWG_Name becomes "L" - like that).
There has got to be a way!
Thanks.
As stated, I've done it using that method, and it works fine for blocks without attributes. Once I hit an attribute, no dice.
(it still seems like "esc" should be available inside the script instead of having to work around it, but maybe that's just me)
No. It doesn't get that far. I could handle it if it did.
Below is what I get:
Command: scr
SCRIPT
Command: -insert
Enter block name or [?] <0000brdr-b>:
0000brdr-b=i:\1000\design\cad_borders\0000brdr-b
Block "0000brdr-b" redefined
Specify insertion point or [Basepoint/Scale/X/Y/Z/Rotate]: @
Enter X scale factor, specify opposite corner, or [Corner/XYZ] <1>:
Enter Y scale factor <use X scale factor>:
Specify rotation angle <0>:
Enter attribute values
1. DRAWING NUMBER < >: Erase
2. PROJECT NUMBER: l
3. DRAWING SCALE:
Then it stops, waiting for the next attribute input. As you can see, it has responded to attribute prompts with my next commands (erase and L)
If this were something as simple as a couple of attributes, I'd just add a few more spaces, or alternate text, but there could many attributes built in, and not always the same amount, obviously, depending on the block.
Have you set ATTREQ to "0"? That will stop it asking for attributes at INSERT.
Here is the whole routine I use for reloading Title Blocks, which are laden with Attributes, as you might imagine:
Code:Tilemode 0 PSpace Zoom Extents (setvar "texteval" 1) (setq snapmode (getvar "Osmode")) (setvar "OSMODE" 0) ATTDIA 0 ATTREQ 0 -INSERT "CUST_A0V=G:/Jobs/39189-01 Crystal Palace/Settings/Borders/Cust_A0v.dwg" 0,0,0 ERASE L Zoom Extents (setvar "OSMODE" snapmode) (setq snapmode nil) ATTDIA 1 Attsync N Cust_A0v
Thanks,
As soon as I get control of my Autocad back (it's crunching something at the moment) I'll try it. The Attdia was (apparently) automatically disabled when I ran the script (which surprised me), and I forgot about the other variable.