Jump to content

Help with macros's


geordie999

Recommended Posts

Hi, I am trying to make a makro or custom command to draw two polylines of varying lengths using a mouse 60mm apart snapped to two entities then when finished have one line 60mm shorter than the other. This is to connect a number of pipes in a plumbing drawing, cheers and any help would be greatly appreciated.

Link to comment
Share on other sites

Since you are using LT, I'm afraid you cannot use custom commands (AutoLISP, ARX or .Net); the script technology is available, but unfortunately there is no user input allowed during their execution. However in order to allow someone to suggest a solution based on a script, please post a sketch of what you are trying to achieve.

 

By the way, welcome to the Forum, Geordie999!

Link to comment
Share on other sites

Hi thank you for your response and welcome to the forum

I have attached a rough sketch of what I am trying to do.

If I could draw two lines 60mm apart on a selected layer which would give the linestyle and colour, these lines would be of varying lengths and change direction the when terminated one to be 60mm shorter than the other.

Any help would be greatly appreciated, best regards

two lines 60mm apart terminating one 60mm shorter than the other.jpg

Link to comment
Share on other sites

How would you determine which line is to be shorter, but another question, have you seen the command "dline" it will draw a double line at the width you tell it, but it means picking points on the centre line.

Link to comment
Share on other sites

Hi Stephen, thank you for your reply, I have tried dline and whilst it is a step in the right direction both lines are the same length and have to be trimmed to 60mm difference.

It doesn't really matter which line is shorter as long as one is which gives the connection to the pipe, cheers

Link to comment
Share on other sites

I'm prety sure that you cannot automate that task with a macro. This is due to the fact that LT don't allows you to add required "inteligence" and also macro technology don't permit user interaction. Sorry!

Link to comment
Share on other sites

Maybe simplest manual method if they are always ortho draw the two lines make sure ortho on F8, F3 no osnap, click line end grip, move up using mouse type 60 it will shorten line exactly 60.

 

Maybe a macro method draw 2 lines

1st pause pick end 2nd pause pick line

this works manually works line any angle,

 

circle R 60 pause Trim L "" pause "" Erase L ""

 

Others will correct for me as a true macro I use LISP.

Link to comment
Share on other sites

I would do a STRETCH on one part (picking from/to points on one of lines) to exceed intersection point and next step will do required EXTEND / TRIM operations (using to toggle between actions).

This should cover any orientation and/or relative angle between parts.

Link to comment
Share on other sites

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