Jump to content
Vision

script: Line w/ 'bd transparent command doesn't allow for multiple lines to be drawn

Recommended Posts

Vision

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.

Share this post


Link to post
Share on other sites
Tuns

Can you post the code? It would be helpful.

Share this post


Link to post
Share on other sites
steven-g

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.

Share this post


Link to post
Share on other sites
Vision
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

Share this post


Link to post
Share on other sites
Tuns

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

Share this post


Link to post
Share on other sites
Vision
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.

Share this post


Link to post
Share on other sites
Vision

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.

Share this post


Link to post
Share on other sites
Tuns

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.

Share this post


Link to post
Share on other sites
Vision
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?

Share this post


Link to post
Share on other sites
Tuns

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.

Share this post


Link to post
Share on other sites
steven-g

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.

Share this post


Link to post
Share on other sites
Vision
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)

Share this post


Link to post
Share on other sites
r4n

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!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×