Vision Posted September 18, 2013 Posted September 18, 2013 I'm trying to use a script to draw multiple lines (from one to the next) when I have the quadrants (1-4), bearings and distances in a file...but it doesn't resume the line command from the endpoint of the last drawn line--and therefore "tweeks" (at the * in the short sample script below). line 'bd 5000,1000 3 17.5057 164.71* 2 78.072 31 3 10.111 50 3 19.2147 116 4 66.215 297 Any hints on forcing it to keep drawing, as it does when I hand enter these commands? NOTE: The nice thing I DID learn is that you can bi-pass the [.P .N .G] choices by just putting in the x,y coordinates to start, "tricking" it to thinking you used your mouse. However, the script works for the beginning, but doesn't behave the same as my hand entered commands, but shows the following: Specify first point: 'bd >>Select starting point or [.P/.N/.G]: 5000,1000 Quadrants - NE = 1, SE = 2, SW = 3, NW = 4 >>Specify quadrant (1-4): 3 Current direction unit: degree, Input: DD° MM' SS.SS" (spaced) >>Specify bearing: 17.5057 >> >>Specify distance: 164.71 Resuming LINE command. Specify first point: Specify next point or [undo]: 2 Specify next point or [undo]: 78.072 Zero length line created at (5224.647, 81.665, 0.000) Specify next point or [Close/Undo]: 31 Zero length line created at (5224.647, 81.665, 0.000) Specify next point or [Close/Undo]: Enter BACKSPACE to interrupt script. Command: 3 Unknown command "3". Press F1 for help. Quote
Tuns Posted September 20, 2013 Posted September 20, 2013 Can you post the code? It would be helpful. Quote
steven-g Posted September 20, 2013 Posted September 20, 2013 It could be that you need to enter 'bd before each point, I can't test it (LT), but some command modifiers only last for the following point and then the command reverts to it's original state. Quote
Vision Posted September 20, 2013 Author Posted September 20, 2013 Can you post the code? It would be helpful. Thanks for responding, Tuns. Here's the code I used (it was simple to test): line 'bd 5000,1000 3 17.5057 164.71 2 78.072 31 3 10.111 50 3 19.2147 116 4 66.215 297 I also tried: line 'bd 5000,1000 3 17.5057 164.71 2 78.072 31 3 10.111 50 3 19.2147 116 4 66.215 297 command Quote
Tuns Posted September 20, 2013 Posted September 20, 2013 So it draws the first line then messes up on the second, correct? Quote
Vision Posted September 20, 2013 Author Posted September 20, 2013 It could be that you need to enter 'bd before each point, I can't test it (LT), but some command modifiers only last for the following point and then the command reverts to it's original state. Good thought. That didn't work either, though. Thanks. Quote
Vision Posted September 20, 2013 Author Posted September 20, 2013 If anyone has other ideas, I'd be glad to hear (as 3 days ago was my first experimentation with scripts)--but I had much less issues with plain coordinates. It took some work, but I used excel to convert the bearings and distances to x,y coords, and I got them to draw the lines nicely. Quote
Tuns Posted September 20, 2013 Posted September 20, 2013 Well that's good to hear (or read). I've never seen a script like that before. What is it called? The scripting language that is. Quote
Vision Posted September 20, 2013 Author Posted September 20, 2013 So it draws the first line then messes up on the second, correct? No. (I read that a script file could just contain the commands that you type in, but they're in a .scr file.) Am I missing something? Quote
Tuns Posted September 20, 2013 Posted September 20, 2013 I don't think your missing anything if it works. I was just asking because it didn't look like anything I've seen before. Quote
steven-g Posted September 20, 2013 Posted September 20, 2013 What is the sequence you use if you just type the commands and enter the bearings at the command line, could you do that and copy the command history, and post that here. Quote
Vision Posted September 20, 2013 Author Posted September 20, 2013 I don't think your missing anything if it works. I was just asking because it didn't look like anything I've seen before. I couldn't agree more. Enjoy the weekend! Quote
r4n Posted April 1, 2014 Posted April 1, 2014 LISP: (defun c:lbd () (setq pt (getpoint "\n Start point: ")) (command "script" "u:\\scripts\\line-bd.scr") ) My Line-bd Script: line !pt 'BD I am putting all of my functions in one file and the scripts in on folder. Easier to track.....ENJOY! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.