Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Building "Escape" into Script

  1. #1
    100 Club
    Join Date
    2003-03
    Posts
    138
    Login to Give a bone
    0

    Default Building "Escape" into Script

    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.

  2. #2
    The Silent Type RobertB's Avatar
    Join Date
    2000-01
    Location
    Seattle WA USA
    Posts
    5,859
    Login to Give a bone
    0

    Default Re: Building "Escape" into Script

    Use some unknown "command", such as "Burp". e.g.
    ._Open
    MyFile
    ._-Layer _set 0

    Burp
    ._-Insert …

  3. #3
    I could stop if I wanted to Mamma Jamma's Avatar
    Join Date
    2000-11
    Location
    Massachusetts
    Posts
    343
    Login to Give a bone
    0

    Default Re: Building "Escape" into Script

    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!

  4. #4
    All AUGI, all the time Avatart's Avatar
    Join Date
    2004-06
    Location
    Upsidedown in dreamtown
    Posts
    928
    Login to Give a bone
    0

    Default Re: Building "Escape" into Script

    Quote Originally Posted by Mamma Jamma View Post
    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!
    The only way I have achieved what yu are after (ie a block redef) is to do the -Insert A=B.dwg, then erase last.

    Here Sample code:
    Code:
     
    -INSERT
    "cust_a1v=G:/Jobs/39201-00 Cambridge IfM/Settings/Borders/cust_a1v"
    0,0,0
     
    ERASE
    L

  5. #5
    I could stop if I wanted to Mamma Jamma's Avatar
    Join Date
    2000-11
    Location
    Massachusetts
    Posts
    343
    Login to Give a bone
    0

    Default Re: Building "Escape" into Script

    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)

  6. #6
    All AUGI, all the time Avatart's Avatar
    Join Date
    2004-06
    Location
    Upsidedown in dreamtown
    Posts
    928
    Login to Give a bone
    0

    Default Re: Building "Escape" into Script

    Quote Originally Posted by Mamma Jamma View Post
    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)
    I've always thought the same, but I can't even find an ASCII code for Esc.

    What is the problem you are having with Attributes? Is it ATTSYNC related?

  7. #7
    I could stop if I wanted to Mamma Jamma's Avatar
    Join Date
    2000-11
    Location
    Massachusetts
    Posts
    343
    Login to Give a bone
    0

    Default Re: Building "Escape" into Script

    Quote Originally Posted by Avatart View Post
    Is it ATTSYNC related?
    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.

  8. #8
    All AUGI, all the time Avatart's Avatar
    Join Date
    2004-06
    Location
    Upsidedown in dreamtown
    Posts
    928
    Login to Give a bone
    0

    Default Re: Building "Escape" into Script

    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

  9. #9
    I could stop if I wanted to Mamma Jamma's Avatar
    Join Date
    2000-11
    Location
    Massachusetts
    Posts
    343
    Login to Give a bone
    0

    Default Re: Building "Escape" into Script

    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.

  10. #10
    All AUGI, all the time Avatart's Avatar
    Join Date
    2004-06
    Location
    Upsidedown in dreamtown
    Posts
    928
    Login to Give a bone
    0

    Default Re: Building "Escape" into Script

    Quote Originally Posted by Mamma Jamma View Post
    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.
    The ATTDIA thing does not suprise me, sign of a half decent batch manager (mine doesn't do this, hence line in script).

    The ATTREQ thing is a little obscure, I had to search for that for a while before having that "Eureka" moment!

Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 0
    Last Post: 2012-06-06, 11:54 AM
  2. Replies: 5
    Last Post: 2010-07-29, 10:54 AM
  3. View "Hiccups" or Jumps when I click or hit escape.
    By mfgarrod in forum Revit Architecture - General
    Replies: 1
    Last Post: 2010-02-26, 11:36 PM
  4. "Escape" from layer dialogue & x-ref boxes
    By Michael.c in forum AutoCAD General
    Replies: 14
    Last Post: 2009-06-24, 02:32 PM
  5. "Escape" from layer dialogue & x-ref boxes
    By Michael.c in forum AutoCAD General
    Replies: 0
    Last Post: 2009-06-22, 02:21 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •