×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

autocad script help: Multiple attributes

autocad script help: Multiple attributes

autocad script help: Multiple attributes

(OP)
autocad script help: Multiple attributes
--------------------------------------------------------------------------------
 Does anyone know of a return character to use in an autocad script file for cases where a space won't work?

For example the following line is supposed to insert a block with the attributes:

WN: GLD-7A
CR: 630

WN: GLD-8A
CR: 928

however, when run, the script instead results in:

WN: GLD-7A 630
CR: INSERT GTE 17037.634,9091.339 1 1 0 GLD-8A 928

Here is the code:

 
INSERT GTE 17037.634,9091.339 1 1 0 GLD-7A 630
INSERT GTE 17037.634,9091.339 1 1 0 GLD-8A 928


Thanks,

RE: autocad script help: Multiple attributes

Since attribute text can accept spaces, the block insert interprets spaces in script file as spaces and not returns.  Instead use returns in your script file, such as:

Insert GTE x,y 1 1 0
GLD-7A
630
Insert ......

RE: autocad script help: Multiple attributes

(OP)
That's too painfully obvious! I ended up using the vbCr character, since I'm using VBA to write the scripts. Thanks for stating the obvious!

mongrel

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources