AutoCAD 2010/2011/2012

Reply
Active Contributor
jasondbrown1
Posts: 28
Registered: ‎04-14-2011
Message 1 of 8 (342 Views)
Accepted Solution

CUIs and Spaces

342 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?

 

 

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.

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

Active Contributor
jasondbrown1
Posts: 28
Registered: ‎04-14-2011
Message 2 of 8 (327 Views)

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.

*Expert Elite*
Patchy
Posts: 6,301
Registered: ‎09-16-2009
Message 3 of 8 (325 Views)

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.

 

Active Contributor
jasondbrown1
Posts: 28
Registered: ‎04-14-2011
Message 4 of 8 (308 Views)

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?

*Expert Elite*
Patchy
Posts: 6,301
Registered: ‎09-16-2009
Message 5 of 8 (284 Views)

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.



Active Contributor
jasondbrown1
Posts: 28
Registered: ‎04-14-2011
Message 6 of 8 (280 Views)

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.

*Pro
nestly
Posts: 1,283
Registered: ‎09-03-2010
Message 7 of 8 (257 Views)

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. 

Active Contributor
jasondbrown1
Posts: 28
Registered: ‎04-14-2011
Message 8 of 8 (235 Views)

Re: CUIs and Spaces

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

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

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!