Community
AutoCAD LT Forum
Welcome to Autodesk’s AutoCAD LT Forums. Share your knowledge, ask questions, and explore popular AutoCAD LT topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

autocad script help: Multiple attributes

5 REPLIES 5
Reply
Message 1 of 6
Anonymous
972 Views, 5 Replies

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



--
George
5 REPLIES 5
Message 2 of 6
Anonymous
in reply to: Anonymous

A space is considered a Return (Enter Key pressed). A new line is also considered a Return and that is what you have to use in this situation.

Patrick
http://www.multi-batch.com
Message 3 of 6
Anonymous
in reply to: Anonymous

Thanks a lot let me give that a shot.. Man that was a fast reply.

George

PatrickB wrote:

> A space is considered a Return (Enter Key pressed). A new line is also
> considered a Return and that is what you have to use in this
> situation.
>
> Patrick
> http://www.multi-batch.com
Message 4 of 6
Anonymous
in reply to: Anonymous

Along with PatrickB's reply using a semi-colon (;) will act
as a return too. Plus help a long script or macro become
more readable or at least help from trying to count spaces.

********************************************************
DO NOT send technical requests to me via private e-mail
********************************************************

Tracy Lincoln
Assistant Moderator, Autodesk Discussion Groups

Discussion Group Links:
Index: http://discussion.autodesk.com
Rules: http://support02.autodesk.com/DiscussionRules.asp

George wrote in message <3B709E47.CA228C63@ipdg3.com>...
>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
>
>
>
>--
>George
>
Message 5 of 6
Anonymous
in reply to: Anonymous

I belive semicolon only works in diesel
macros and not in script files?

Conny

"Tracy W. Lincoln" wrote:
>
> Along with PatrickB's reply using a semi-colon (;) will act
> as a return too. Plus help a long script or macro become
> more readable or at least help from trying to count spaces.
>
> ********************************************************
> DO NOT send technical requests to me via private e-mail
> ********************************************************
>
> Tracy Lincoln
> Assistant Moderator, Autodesk Discussion Groups
>
> Discussion Group Links:
> Index: http://discussion.autodesk.com
> Rules: http://support02.autodesk.com/DiscussionRules.asp
>
> George wrote in message <3B709E47.CA228C63@ipdg3.com>...
> >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
> >
> >
> >
> >--
> >George
> >
Message 6 of 6
Anonymous
in reply to: Anonymous

"George" wrote in message
news:3B709E47.CA228C63@ipdg3.com...
> 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

George,

I have found that WordPerfect is the easiest way for me to write scripts for
blocks with multiple attributes. You need a hard return (WordPerfect
terminology) instead of a space as a space is interpreted as a space in the
first attribute.

INSERT GTE 17037.634,9091.339 1 1 0 GLD-7A(hard return)630

CR: INSERT GTE 17037.634,9091.339 1 1 0 GLD-8A 928 ;This is inserted as the
second attribute and from my experience, you may get two or three blocks max
when the script will crash.

If this is unclear, please let me know and I will try to explain it in a
more logical manner.

Good luck,

Ray
Then said he unto them, But now, he that hath a purse, let him take it, and
likewise his scrip: and he that hath no sword, let him sell his garment, and
buy one. - Luke 22:36 KJV

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost