Text Script - Copy and Paste from EXCEL Not Working

Text Script - Copy and Paste from EXCEL Not Working

jeremy.herman90
Explorer Explorer
696 Views
8 Replies
Message 1 of 9

Text Script - Copy and Paste from EXCEL Not Working

jeremy.herman90
Explorer
Explorer

Hello,

I have a spreadsheet with the following formula:

=CONCATENATE("TEXT ","J ","MC ",H1," 5"," 0"," TEXT")

This gives: TEXT J MC 384895.42,409157.73 5 0 TEXT

When I copy and paste the above into the AutoCAD command line, it gets me all the way to the rotation angle specified as 0, but still is waiting for keyboard entry of the text. I want it to input "TEXT" as well, but it isn't.

When I put the same command in a script file and upload as a script, it works. Any ideas?

 

0 Likes
Accepted solutions (1)
697 Views
8 Replies
Replies (8)
Message 2 of 9

fatal.error
Advocate
Advocate
Accepted solution

Have you tried this?

 

(command "text" "J" "MC" "384895.42,409157.73" 5 0 "TEXT")

 

0 Likes
Message 3 of 9

jeremy.herman90
Explorer
Explorer

Hi, thanks for your reponse. It does not appear to have worked, see screenshot:

jeremyherman90_0-1646663548586.png

 

0 Likes
Message 4 of 9

fatal.error
Advocate
Advocate

Your "MN" justify is not a valid option, at least in my acad:

 

fatalerror_0-1646664134193.png

 

Please try MC as the code above.

0 Likes
Message 5 of 9

pendean
Community Legend
Community Legend

Fix your typo

 

pendean_0-1646664678699.png

 

0 Likes
Message 6 of 9

tramber
Advisor
Advisor

Our friend gave you some lisp....

You need to simulate one more space or ;

(look, the "_" stand for a space)

TEXT J MC 384895.42,409157.73 5 0 "MYTEXT"__

End

 

TEXT J MC 384895.42,409157.73 5 0 "MYTEXT"_

TEXT J MC 384895.42,409157.73 5 0 "MYTEXT"_

 

End

 

A double space is missing or a single one if you enter Return between two lines in a scr file...


EESignature

0 Likes
Message 7 of 9

jeremy.herman90
Explorer
Explorer

Nice spot, I tried (with fix) but still did not work:

jeremyherman90_0-1646664458665.png

 

0 Likes
Message 8 of 9

jeremy.herman90
Explorer
Explorer

Apologies - it did in fact work. Just already had something in the same location from previous tries so was generating error. Many thanks!

Message 9 of 9

jeremy.herman90
Explorer
Explorer

Thank you for this. I would like to get this solution to work as well, as it lends itself to better spreadsheeting. I tried this:

EXCEL formula: =CONCATENATE("TEXT ","J ","MC ",H1," 5"," 0"," TEXT__")

Which gives: TEXT J MC 384895.42,409157.73 5 0 TEXT__

When I copy and paste the above directly from the EXCEL spreadsheet, I get the same probem as originally. Leaves me wanting keyboard input.

jeremyherman90_0-1646665076668.png

jeremyherman90_1-1646665084816.png

 

0 Likes