Jump to content

macro with offset


Joro--

Recommended Posts

Hello,

 

I am new to macros and I try to write a macro that does the following:

 

the user draws a line and automatically appear two other lines - one left and one right each offset by 100 from the original line. Is it possible with macros?

Any help is welcome!

 

Joro

Link to comment
Share on other sites

There are so many themes on your request, bottom line is you can have as many as you like and at all sorts of offsets. Search here for offset or start here http://www.cadtutor.net/forum/showthread.php?84919-Draw-double-polyline/page1 there is lots of links have a look at all pages my last input did all sorts of things like width color and layer.

Link to comment
Share on other sites

Yes, you are both right ReMark and Bigal,

This sounds more like a lisp task. I would personally use VBA, but the problem is, that i need it in AutoCad LT, and there are supported only diesel macros. I'm actually trying to draw a pipe with middle line

Any suggestions?

Link to comment
Share on other sites

It would have been beneficial to state that piece of information (needed for LT) in your first post.

 

There are websites that specifically address creating diesel macros for AutoCAD LT. Have you tried any of them?

Link to comment
Share on other sites

Yes, this is possible with a macro. There are a few different options, depending on the drawing environment that it will be used in.

 

Is it on cardinal bearing? ie, horizontal or vertical? Or will the lines be at varying angles?

 

Will you first draw the line, then immediately offset it? Or is it an existing line that the user will pick after starting the macro?

Link to comment
Share on other sites

Hi YZ,

 

The angle of lines varies . What I'd like to do is - the user draws a line, the line can be in any direction, then starts the command offset and the user is asked to enter offset distance, the line is offset both sides with the half of the distance entered

would a macro do this?

 

Regards,

Joro

Link to comment
Share on other sites

Yes a macro can do this. It sounds like you are drawing stormwater pipes, are you in civil engineering?

 

What version of AutoCAD is it for? There was a change in 2014 to the way macros handle selection sets. A macro to do this would have to be different if you wanted to use it in 2014 or 2015.

Link to comment
Share on other sites

Yes, I want to draw pipes - for HVAC. The macro should work with AutoCad 2015LT. It would be even better if the middleline is changed to different layer after the offset.Could you write smth like this?

 

Regards

Joro

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