Jump to content

i have one challanging job to do please help me


Recommended Posts

Posted

Hi All Experts,

 

i have one challanging job to do please help me.

 

i want to draw one circle with dimension in meter + some more circle of 1/2 dia of same circle + 1/4 dia of same + 1/3 dia of same + 1/6 dia of same this all other circle are dimension according to the 1st circle which should be in meter.

 

for Example :

 

Dia of Circle is - 60 m.

than 1 st circle should be offset of 60m dia circle calculating 1/2 dia of the same circle and it should be in diffrent colour or layer like this all other circle should have same offset accordingly

Posted

here's something quick and dirty, the changing of the layers or colors is up to you.

Tested only in Bricscad

 

you would start with drawing your first circle and then select it...

 

;;GET DATA
(    setq el    (entget (car (entsel)))
   r (cdr (assoc 40 el))
   half (/ r 2.0)
   third (/ r 3.0)
   quarter (/ r 4.0)
   sixth (/ r 6.0)
   midpt (cdr (assoc 10 el))
)

;;DRAW CIRCLES

(command "_.CIRCLE" midpt half)
(command "_.CIRCLE" midpt third)
(command "_.CIRCLE" midpt quarter)
(command "_.CIRCLE" midpt sixth)

Posted

i am using autocad how to use with this code in cad

Posted

something I just realized after reading your post again:

 

are the concentric circles to go outward for the first circle or inward?

 

going inward use the code above

 

going outward would be this instead:

 

    half (+ r (/ r 2.0))     third (+ r (/ r 3.0))     quarter (+ r (/ r 4.0))     sixth (+ r (/ r 6.0))

Posted

Capture.JPG

 

This is the way i am looking for this is just example of 1/2dia from the main tank.

Posted

I understand what you mean now. All the code I posted was intended for the command line. You are looking for something to load and run. Save the code to an external file and load it into your drawing. Draw your tank circle and type the command TEST in the command line. It should prompt you to select an entity (in this case the circle representing the tank).

 

(defun c:test ()
;;GET DATA
(    setq el    (entget (car (entsel)))
    r (cdr (assoc 40 el))
    half (+ r (/ r 2.0))
    third (+ r (/ r 3.0))
    quarter (+ r (/ r 4.0))
    sixth (+ r (/ r 6.0))
    midpt (cdr (assoc 10 el))
)
;;DRAW CIRCLES
(command "_.CIRCLE" midpt half)
(command "_.CIRCLE" midpt third)
(command "_.CIRCLE" midpt quarter)
(command "_.CIRCLE" midpt sixth)
) 

Posted

In AutoCAD lisp routines can be loaded at least two or three ways. One option is to use APPLOAD.

Posted
In AutoCAD lisp routines can be loaded at least two or three ways. One option is to use APPLOAD.

 

While testing things out I usually drag-n-drop the lisp file into the drawing.

Posted

[ATTACH=CONFIG]41012[/ATTACH]

 

This is the way i am looking for this is just example of 1/2dia from the main tank.

 

LibertyOne please check my post 17 with image

Posted

That's fine for testing but what do you do for loading your lisp routines? Do you use the Startup Suite? Acad.lsp? Acaddoc.lsp?

Posted (edited)
That's fine for testing but what do you do for loading your lisp routines? Do you use the Startup Suite? Acad.lsp? Acaddoc.lsp?

 

Yes, when I was working with AutoCAD, I used the acad.lsp and acaddoc.lsp files. I've been using MicroStation for the past year and a half. I still program little things but unfortunately don't have AutoCAD to test things on. I am seriously thinking of purchasing a Bricscad licence in the near future.

Edited by LibertyOne

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