Can you enter an "up arrow" in a script?

Can you enter an "up arrow" in a script?

abe.sorgeYGEN7
Explorer Explorer
541 Views
8 Replies
Message 1 of 9

Can you enter an "up arrow" in a script?

abe.sorgeYGEN7
Explorer
Explorer

Working with scripts and AutocadLT 2022, and wondering if there is a way to enter an "up arrow" in a script. 

 

Alt-24 creates ↑ but that AutocadLT 2022 doesn't recognize that as valid. I'm making scripts with lines, and when you are in a line command and press up-arrow you can choose prior ending points of your line to begin new lines, hoping to automate that. It might be possible because when you put an "enter" command in a script, it will pick up from the coordinates where you finished your last line. 

 

 

0 Likes
542 Views
8 Replies
Replies (8)
Message 2 of 9

pendean
Community Legend
Community Legend
Nope.
Message 3 of 9

abe.sorgeYGEN7
Explorer
Explorer

Well that's simple. 

 

Anything come to mind that would perform a similar function? Appreciate your help here.

0 Likes
Message 4 of 9

Kent1Cooper
Consultant
Consultant

@abe.sorgeYGEN7 wrote:

.... when you are in a line command and press up-arrow you can choose prior ending points of your line to begin new lines, hoping to automate that. .... 


How were you picturing this would work, operationally?  If you're imagining being able, inside the running of a Script, to poke around multiple earlier points until you choose one to apply, a Script can't do an indeterminate number of pokes until you say Yes [i.e. presumably press Enter].  It has to be "self-contained."  So even if it were possible to feed a keystroke like that into a Script, I can't picture the steps involved on the part of the User.  It might be possible to work something out in AutoLisp, if the possible other points are all happening earlier within the same routine and can be saved along the way for possible re-selection later, but using LT, that's off the table.

Kent Cooper, AIA
Message 5 of 9

pendean
Community Legend
Community Legend

@abe.sorgeYGEN7 wrote:

Well that's simple. 

 

Anything come to mind that would perform a similar function? Appreciate your help here.


Full AutoCAD and coding with LISP is what you need: a possible option, in LT, would be to figure out how to capture that information you want first without user input or interference, then try to recall it later on in the script if it can be saved as  SETENV variable (you'd use GETENV to recall it) if it is not saved in a read-only or recallable variable in LT to start with.

 

You'll have to test all of that out yourself to see what is available.

Message 6 of 9

abe.sorgeYGEN7
Explorer
Explorer

For context, this is part of a spreadsheet that performs some calculations on survey information and also generates scripts for polylines at the same time. It does work sequentially, but only because the spreadsheet does some computational stuff to create valid scripts. The script looks something like this: 

 

PLINE 5000,5000 @Anonymous.848<S3D10'40"E
@Anonymous.288<S69D30'2"W
@Anonymous.96<N26D22'53"E
@Anonymous.089<S64D9'23"E
A R 107.5 A 14.0016599172511 S70D9'40"E
R 107.5 A 16.0160301795154 S85D10'11"E
L @Anonymous.727<N86D49'20"E
@Anonymous.474<N86D49'20"E

 

To answer your question, this is simply copy-pasted right from the excel sheet into the command line. I was hoping if I could find an "up-arrow equivalent" command line character to mimic that keypress, I could add it with the spreadsheet in the appropriate places. This would allow me to break the sequential nature by stepping back along the polyline to generate sidelines from previous nodes.

 

This system reaches the limits when there are unscriptable keyboard presses, I suppose.

 

 

0 Likes
Message 7 of 9

abe.sorgeYGEN7
Explorer
Explorer
Never heard of these variables, but I'll investigate. Thanks.
0 Likes
Message 8 of 9

pendean
Community Legend
Community Legend

@abe.sorgeYGEN7 wrote:
Never heard of these variables, but I'll investigate. Thanks.

When you look them up don't forget about the golden rule with those:

 

"...Note: The registry variables are case sensitive...."

0 Likes
Message 9 of 9

Sea-Haven
Mentor
Mentor

Your using excel now and making a script so I would go a bit further and convert the @Anonymous dist to a XY, then a side shot could be added as you know say which line has side shots. As Excel has VBA could write a traverse and side shot macro. I would look at a point number type arrangement so a pline would be 1-2-3-4 side shot 3-32. More like a CIV3D approach of handling points. Note a blank cell when copy pasted is a Enter so can end say a line then start a new one again.

0 Likes