×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

A toolbar and a lisp question

A toolbar and a lisp question

A toolbar and a lisp question

(OP)
I'm having problems creating a toolbar macro.
I want to change layers, insert a block (for a custom leader arrow) and then spline the leader line.

This works to just insert the block and draw the leader:

^C^C-i c:/plbg/l3.dwg ^C^Cdimldrblk L3 qleader;

When this is done, I don't see the block inserted, it just draws the leader and I can rotate it to any angle I want, but I have to hit the spacebar to change to spline, and it draws it on whatever layer I'm on.

This makes the layer, moves to it and inserts the block but I have to hit enter to get past the rotation angle, scale factor and then it stops with the leader arrowhead inserted with no tail... Also need to figure out how to make it spline without hitting the spacebar:

^C^C-l m p-text c 6 ;;; -i c:/plbg/l3 ^C^Cdimldrblk L3 qleader;

What am I doing wrong?


I'm also trying to find a lisp routine to calculate invert elevations. I've looked at every lisp site I can find thru search engines, but no luck. What I need it to do is really pretty simple. When it's started I need to:
Input an elevation
It then would do a qleader from a point I pick and write the elevation.
It would then ask what slope (either 1/8"/ft or 1/4"/ft)and if I want to slope up or down.
Then wait for me to select a point to start calculating from. (starting point elevation +/- (distance * 0.0104 or 0.0208)).
When I select another point it would calculate the drop or rise.
Then it would do another qleader and write the answer, remember that value and wait for the next point to calculate or exit the command.

If somoene could tell me where I could find something similar to that, it would be greatly appreciated.

RE: A toolbar and a lisp question

Hi drpipes,

here are some "causes for thought"

^C^C-la;m;p-text;_colour;6;;;_-insert;c:/Your.dwg;\;;;^C^C_dimldrblk;Your Arrow;_leader;\\f;s;;;;

I hope that's a right step in the right direction...

Lothar

ADT 2004
ACAD 2002

RE: A toolbar and a lisp question

(OP)
Close, but no cigar.

When I use the macro you suggested, it inserts the block and then I can do a splined leader, but it won't erase the original block insert and it won't let me pick 3 points for the splined leader. When I pick the second point, it draws the leader with a small arc.

Thanks, you helped me over one of the humps.

RE: A toolbar and a lisp question

Drpipes,

maybe You have to write a lispcode. I can't.

"... but it won't erase the original block insert .." I'm sorry, I don't understand it exactly. What do You want to erase?


For a 3 points splined leader You have to take ^C^C_dimldrblk;Your Arrow;_leader;\\\f;s;;;;

Lothar

ADT 2004
ACAD 2002

RE: A toolbar and a lisp question

(OP)
Maybe I need to explain my issue a little better. We know in order to use a custom arowhead you first have to insert a block of the arrowhead and then, using dimldrblk you can define it as an arrowhead. This is my original macro:

^C^C-i c:/plbg/l3 ^C^Cdimldrblk L3 qleader;

This just defines the block (adds it to the dwg) without actually drawing it and will then draw the leader. It works fine, but I have to manually make or switch to the text layer, click the toolbar button, hit space and switch to spline, then draw the leader. I want to automate the whole process.

When I click the button, I want to:

1.   Switch to the text layer or if it's not been made, make it. That's where I got this:  ^C^C-l;m;p-text;c;6;;;

2.   Insert my arrowhead block into the dwg, but I don't want it drawn... I just want it defined in the dwg.

3.   Switch to spline.

4.   Draw the leader.

Your first suggestion:

^C^C-la;m;p-text;_colour;6;;;_-insert;c:/Your.dwg;\;;;^C^C_dimldrblk;Your Arrow;_leader;\\f;s;;;;

Makes the layer, inserts the block and draws it (not just define it) and then it will let me draw a 2 point leader (instead of a 3 point leader) and then it will draw a small arc after I right click to finish the command.

So I tried this to erase the inserted block:

^C^C_-la;m;p-text;_c;6;;;_-i;c:/plbg/l3.dwg;\;;;erase;last;;;^C^Cdimldrblk;L3;qleader;\\f;s;;;

Makes the layer, inserts the block and draws it (not just define it) erases it and then it will draw a 2 point leader (instead of a 3 point leader) and it won't spline.

I appreciate the help you have given me so far. Maybe with this blow by blow of what I want it to do and what it is doing will help either you or someone else help me get this working correctly.

Again, I appreciate the help.

RE: A toolbar and a lisp question

ok, drPipes,
next attempt:

1. I agree with You

2. Insert a block, and erase it again (just define):
^C^C_-insert;c:/plbg/l3.dwg;0,0,0;;;;_erase;_last;;
-> specify the insertionpoint -> there's no need to click

3. You can't switch to a spline

4. Your error (IMHO) is, that You want to work with "_qleader". Use "_leader" -> 3 points-> form spline-> write mtext-> <ok>

I tried to explain that in my previous reply.
^C^C_dimldrblk;l3;_leader;\\\f;s;;;;

So my suggestion is:
^C^C_-la;m;p-text;_c;6;;;_-insert;c:/plbg/l3.dwg;0,0,0;;;;_erase;_last;;^C^C_dimldrblk;l3;^C^C_leader;\\\f;s;;;;

OK? If not, reply...

Lothar

ADT 2004
ACAD 2002

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources