Jump to content

Automatic drawing circle at intersection of two lines in AutoCAD


blagojer

Recommended Posts

Yes, but I would like "automatic drawing"! Sometime, I have 200 lines without same distance (no copy-paste)!!!

Maybe some LISP?...

Link to comment
Share on other sites

You would need either a macro or a lisp routine to accomplish the task. You want to insert an arc at the intersection then break or trim away the line segment between the two endpoints of the arc.

Link to comment
Share on other sites

updating to electrical would be the only way to do it automatically. There are ways you can do it afterwards as Mark has said. Whenever it has been requested of me I always point out how much longer it will take, both to draw and to modify and I am usually left to stick to the company standard.

Link to comment
Share on other sites

I find LISP, but doesn't work, I have error: no function definition: DXF

 

(defun C:arcc ( / head hdata bulge en ed)

(if (and

(setq en (entsel "\nselect polyline: "))

(= (dxf 0 (setq hdata

(entget (car en)))) "POLYLINE")

)

(progn

(entmod (subst '(70 . 1) '(70 . 0) hdata))

(setq bulge (list (cons 42 0.5)))

(setq en (dxf -1 hdata))

(while (and (setq en (entnext en))

(setq ed (entget en))

(/= "SEQEND" (dxf 0 ed))

)

(setq ed (append ed bulge))

(entmod ed)

)

(entupd en)

) )

(princ)

)

(princ)

Link to comment
Share on other sites

Yes, but I would like "automatic drawing"! Sometime, I have 200 lines without same distance (no copy-paste)!!!

Maybe some LISP?...

 

I cannot update to electrical, Mark has explaned what I want...

 

I find LISP, but doesn't work, I have error: no function definition: DXF

 

You can catch more flies with honey.

 

(defun dxf (# e) (cdr (assoc # e)))

Link to comment
Share on other sites

We used to use this sort of thing all the time in Civil for Autocad. What one fellow did was to create a special line type. Then as you move the line endpoint, it moves the lines and the symbol too. Most countyies and cities in California require such to be done when showing off the boundary for some parcel.

 

The line type allowed you to use an open circle or a disc at angle points and long as you were on proper layer the wine width got set too.

 

You may need a special linetype instead of a routine.

 

 

Wm.

Link to comment
Share on other sites

How can I do it? Like in AutoCAD electrical, when I drawing wire? Please see attach.

 

 

Thanks

Blagojer

 

This lisp file will do that after the fact, the size is controlled by ltscale.

PIDcross.LSP

Link to comment
Share on other sites

This lisp file will do that after the fact, the size is controlled by ltscale.

 

 

Excellent - been looking for this for a while. I do electrical and it will come in handy in my daily work. Thank you very much - I appreciate it.

Link to comment
Share on other sites

BTW if I wanted an ltscale of .4072 for the arc and then have it return to ltscale of 1 how would I modify the lsp to make it do that?

Link to comment
Share on other sites

BTW if I wanted an ltscale of .4072 for the arc and then have it return to ltscale of 1 how would I modify the lsp to make it do that?

 

Not entirely sure what you are asking. You want the arc to be a certain size that an ltscale of 1 doesn't give you now?

 

The code has the arc size scaled at 0.1 * ltscale, this happens twice in the code at "(* LS 0.1)". This is really old code I obtained back in 1990 so I am sure it could be written much better today. You could change the 0.1 in the code, you could change ltscale on the fly to that amount, you could change the line in the code from (Setq LS (Getvar "LTSCALE")) to (Setq LS 0.4072)

 

Hopefully that helps you, if not post back.

Link to comment
Share on other sites

I don't know lisp, but after taking a look at the code, reading, searching, and trying to change things and then trial and error I gave up. Put a post in the LISP area and Lee Mac fixed me up with a new code.

 

I needed the specific size because I am lazy and didn't want to do the ltscale command before the lisp and reset after the lisp.:oops::lol:

 

Anyway between you and Lee I have a lisp that makes my life simpler. I can't thank you enough. Hugs.

Link to comment
Share on other sites

I don't know lisp, but after taking a look at the code, reading, searching, and trying to change things and then trial and error I gave up. Put a post in the LISP area and Lee Mac fixed me up with a new code.

 

I needed the specific size because I am lazy and didn't want to do the ltscale command before the lisp and reset after the lisp.:oops::lol:

 

Anyway between you and Lee I have a lisp that makes my life simpler. I can't thank you enough. Hugs.

Link to the new code:

http://www.cadtutor.net/forum/showthread.php?t=45820

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