Jump to content

Recommended Posts

Posted

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.

Posted

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.

Posted
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

Posted

So it draws the first line then messes up on the second, correct?

Posted
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.

Posted

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.

Posted

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.

Posted
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?

Posted

I don't think your missing anything if it works. :lol: I was just asking because it didn't look like anything I've seen before.

Posted

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.

Posted
I don't think your missing anything if it works. :lol: I was just asking because it didn't look like anything I've seen before.

 

I couldn't agree more. Enjoy the weekend! 8)

  • 6 months later...
Posted

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!

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...