AutoCAD 2010/2011/2012

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

CUIs and Spaces

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

 

 

Active Contributor
jasondbrown1
Posts: 28
Registered: ‎04-14-2011
Message 2 of 8 (312 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,220
Registered: ‎09-16-2009
Message 3 of 8 (310 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 (293 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,220
Registered: ‎09-16-2009
Message 5 of 8 (269 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 (265 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 (242 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 (220 Views)

Re: CUIs and Spaces

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

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

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community




Connect with AutoCAD

Twitter

Facebook

Blogs

Pinterest

Youtube