• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • AutoCAD 2010/2011/2012 DWG Format

    Reply
    Active Contributor
    jasondbrown1
    Posts: 28
    Registered: ‎04-14-2011
    Accepted Solution

    CUIs and Spaces

    265 Views, 7 Replies
    09-06-2011 12:29 PM

    Is there a way to have spaces in a command and the command still follow through without assuming "enter" wa **** when a space is received while entering info through a cui file?

     

    Heres my issue: In my CUI file i have a macro that refers to a layer to be set current, the layer has a space in it (e-special systems).  When this button is pressed, i get an error on the command bar saying "cannot find layer "e-special"  The reason, is because there is none.  I typed the underscore ( _ ) charachter to try to use that as the space, but it looked at it as being in the layer name.  provided is two screen shots.   Would i just have to take the space out of the layer name?

     

     

    Please use plain text.
    Active Contributor
    jasondbrown1
    Posts: 28
    Registered: ‎04-14-2011

    Re: CUIs and Spaces

    09-06-2011 12:47 PM in reply to: jasondbrown1

    apparantly when i typed "was hit" i spaced before the 's' and it made a word that offends some people somehow.   hope that doesnt confuse anyone.

    Please use plain text.
    *Expert Elite*
    Patchy
    Posts: 5,313
    Registered: ‎09-16-2009

    Re: CUIs and Spaces

    09-06-2011 12:51 PM in reply to: jasondbrown1

    Many years ago a Layer Name can not have a space in between so Macro would work fine.

    http://www.cadtutor.net/tutorials/autocad/object-properties.php

    Later on Layer name can be long and spaces can be used, macro stuck on first gear.

     

    Please use plain text.
    Active Contributor
    jasondbrown1
    Posts: 28
    Registered: ‎04-14-2011

    Re: CUIs and Spaces

    09-06-2011 01:04 PM in reply to: Patchy

    I know that i can now.   Sooooo, is there a way to represent a space in a macro or do i need to take out the space in my layer names?

    Please use plain text.
    *Expert Elite*
    Patchy
    Posts: 5,313
    Registered: ‎09-16-2009

    Re: CUIs and Spaces

    09-06-2011 01:36 PM in reply to: jasondbrown1

    It's a 30-mile long marathon to make a button macro to set a layer current with layer name have bunch of spaces, I made it before but NEVER use it because it's faster with LAYCUR command.

     

    Make a lisp to set that layer current and then add this lisp to Startup Suite.

    CUI, in the Macro, put in the command of this lisp, it will work.

    

    Please use plain text.
    Active Contributor
    jasondbrown1
    Posts: 28
    Registered: ‎04-14-2011

    Re: CUIs and Spaces

    09-06-2011 01:42 PM in reply to: Patchy

    That adds a command that i was omitting by using this method.  In the past if something was on the wrong layer, i simply just selected it and used the pulldown from the toobar to change it.  I'll just change my layer name and macro to have no space.

    Please use plain text.
    *Pro
    nestly
    Posts: 1,283
    Registered: ‎09-03-2010

    Re: CUIs and Spaces

    09-06-2011 06:09 PM in reply to: jasondbrown1

    You gave up too easily.  Just put quotes around your layer name. 

    Please use plain text.
    Active Contributor
    jasondbrown1
    Posts: 28
    Registered: ‎04-14-2011

    Re: CUIs and Spaces

    09-07-2011 05:05 AM in reply to: nestly

    yea i know.   Thanks for the help, this worked.

    Please use plain text.