sayhi_sanjay1 Posted March 24, 2013 Posted March 24, 2013 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 Quote
LibertyOne Posted March 24, 2013 Posted March 24, 2013 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) Quote
sayhi_sanjay1 Posted March 24, 2013 Author Posted March 24, 2013 i am using autocad how to use with this code in cad Quote
LibertyOne Posted March 24, 2013 Posted March 24, 2013 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)) Quote
sayhi_sanjay1 Posted March 24, 2013 Author Posted March 24, 2013 This is the way i am looking for this is just example of 1/2dia from the main tank. Quote
LibertyOne Posted March 24, 2013 Posted March 24, 2013 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) ) Quote
ReMark Posted March 24, 2013 Posted March 24, 2013 In AutoCAD lisp routines can be loaded at least two or three ways. One option is to use APPLOAD. Quote
LibertyOne Posted March 24, 2013 Posted March 24, 2013 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. Quote
sayhi_sanjay1 Posted March 24, 2013 Author Posted March 24, 2013 [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 Quote
ReMark Posted March 24, 2013 Posted March 24, 2013 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? Quote
LibertyOne Posted March 24, 2013 Posted March 24, 2013 (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 March 24, 2013 by LibertyOne Quote
Recommended Posts
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.