TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: masao on July 10, 2022, 07:00:24 AM

Title: How to draw?
Post by: masao on July 10, 2022, 07:00:24 AM
sorry i know draw step but how to get rectangle 2 point?

must be use VL-LISP?

i can't understand it now.

i just drew to step 2(pateblock).

(defun c:cc()

(setq ss (ssget))

(command "._COPYBASE" "0,0" ss "")

(command "._pasteblock" "0,0")
)

thank you so much.
Title: Re: How to draw?
Post by: BIGAL on July 10, 2022, 10:24:31 PM
The 4 lines option was answered elsewhere, the circle is easy just select it, get center point and radius, then its just a simple polar to work out the 4 points for the 2 lines. Angle 0.0 (/ p1 2.0) pi (* 1.5 pi)
Title: Re: How to draw?
Post by: masao on July 16, 2022, 02:38:08 AM
how to make block add to VLaxLISIP get rectangle?
Title: Re: How to draw?
Post by: BIGAL on July 16, 2022, 09:25:18 PM
how to make block add to VLaxLISIP get rectangle?

Not sure what you want but a + block could be placed rather than lines just use scale x scale y on block. Same for circles.

Make the block length 1 unit in both directions, insert point is middle.
Title: Re: How to draw?
Post by: 57gmc on July 18, 2022, 01:18:49 PM
It looks like you are trying to draw centerlines. Have you tried using AutoCAD's centerline features? Look on the Centerlines panel of the Annotation ribbon tab. You can draw centermark's for circles and arcs or centerlines for linear features.