It seems that AutoCAD dev team doesn't have a clue what software they are making and who is suppose to use. I don't need tools which consume a lot of time and it makes inaccurate and is not presentable to the client. We are not in Paper age anymore.
I am looking for a simple lisp or tool to draw polyline arc circuits with a defined angle and only two-point. Then it should work is like what. First I set angle that always will 30 (that I mean by 30. It doesn't matter if I will go up, or down, or any direction it will always will make the same angle between to point) and then I start First Point, then Next point. And when Next point. So basically you start with setting angle 30, when you chose the first point, when you chose the next point, after that always next point until you decide to change the angle.
I tried AutoCAD 2021 polylines, it draws snakes or you have always type angle and also calculate angle if you go up or down or any direction and so on.
I tried AutoCAD MEP 2021 using wire objects which are crap function. You still have to chose three points.
Can some help me in this situation as Autodesk team failed to make useful and simple tools for Electrical and Lighting design.
Many thanks,
Robertas
Solved! Go to Solution.
It seems that AutoCAD dev team doesn't have a clue what software they are making and who is suppose to use. I don't need tools which consume a lot of time and it makes inaccurate and is not presentable to the client. We are not in Paper age anymore.
I am looking for a simple lisp or tool to draw polyline arc circuits with a defined angle and only two-point. Then it should work is like what. First I set angle that always will 30 (that I mean by 30. It doesn't matter if I will go up, or down, or any direction it will always will make the same angle between to point) and then I start First Point, then Next point. And when Next point. So basically you start with setting angle 30, when you chose the first point, when you chose the next point, after that always next point until you decide to change the angle.
I tried AutoCAD 2021 polylines, it draws snakes or you have always type angle and also calculate angle if you go up or down or any direction and so on.
I tried AutoCAD MEP 2021 using wire objects which are crap function. You still have to chose three points.
Can some help me in this situation as Autodesk team failed to make useful and simple tools for Electrical and Lighting design.
Many thanks,
Robertas
Solved! Go to Solution.
Solved by ВeekeeCZ. Go to Solution.
You do not need any lisp to do that, AutoCAD is loaded with this feature since it bord.
explore SNAP command & Rotate option
have you heard about ORTHO?
Moshe
You do not need any lisp to do that, AutoCAD is loaded with this feature since it bord.
explore SNAP command & Rotate option
have you heard about ORTHO?
Moshe
Moshe,
I think you misunderstand. I have a picture as an example. Please see See highlighted examples. This is one polyline.
Regards,
Robertas
Moshe,
I think you misunderstand. I have a picture as an example. Please see See highlighted examples. This is one polyline.
Regards,
Robertas
i'm sorry i do not see any relation between your request and the picture
where is the 30 degree angle here?
i'm sorry i do not see any relation between your request and the picture
where is the 30 degree angle here?
Try this. The only issue is that you have to end it by ESC, twice. At this point can't figure out better way...
(defun c:PLA nil (command "_.pline" pause "_arc") (while (> (getvar 'CMDACTIVE) 0) (command "_angle" 30 pause)) (princ) )
Try this. The only issue is that you have to end it by ESC, twice. At this point can't figure out better way...
(defun c:PLA nil (command "_.pline" pause "_arc") (while (> (getvar 'CMDACTIVE) 0) (command "_angle" 30 pause)) (princ) )
Thank you for quick replay and this how it looks your method in Picture 1. You are very close. Can we have more client-friendly like in Picture 2? It is possible to get more control like to flip Arc to the opposite side by holding keyboard button Shift(ctrl) in case I need.
Thank you for quick replay and this how it looks your method in Picture 1. You are very close. Can we have more client-friendly like in Picture 2? It is possible to get more control like to flip Arc to the opposite side by holding keyboard button Shift(ctrl) in case I need.
@robertas_suminskas2 For better understanding, and maybe get further help, please upload such sample.dwg
@robertas_suminskas2 For better understanding, and maybe get further help, please upload such sample.dwg
It can be challenging but at some time it is very useful to have a lisp or tools to make circuits or logical groups for lighting.
Please see the attached example.
It can be challenging but at some time it is very useful to have a lisp or tools to make circuits or logical groups for lighting.
Please see the attached example.
The previous code is impossible to impove.
The following is a different approach.
(defun c:PLA ( / *error* e q p a o done) (defun *error* (errmsg) (if (not (wcmatch errmsg "Function cancelled,quit / exit abort,console break,end")) (princ (strcat "\nError: " errmsg))) (if e (setvar 'cmdecho e)) (princ)) ; ------------------------------------------------------------------------------------------------------------ (setq e (getvar 'cmdecho)) (setvar 'cmdecho 0) (princ "Specify first point: ") (command "_.pline" pause "_arc") (setq p (getvar 'lastpoint) a 1) (while (not done) (initget "Done Undo Lastswap") (setq o (getpoint p (strcat "\r>> Next " (if (minusp a) "LEFT" "RIGHT") " curve point or [Undo/Lastswap/Done] : "))) (cond ((not o) (setq a (* a -1))) ((= o "Undo") (if q (setq p q)) (command "_undo" "_arc")) ((= o "Done") (setq done (vl-cmdf ""))) ((= o "Lastswap") (command "_undo" "_arc" "_angle" (* (setq a (* a -1)) 30) "_non" p)) (T (command "_angle" (* a 30) "_non" (setq q p p o))))) (princ) )
The previous code is impossible to impove.
The following is a different approach.
(defun c:PLA ( / *error* e q p a o done) (defun *error* (errmsg) (if (not (wcmatch errmsg "Function cancelled,quit / exit abort,console break,end")) (princ (strcat "\nError: " errmsg))) (if e (setvar 'cmdecho e)) (princ)) ; ------------------------------------------------------------------------------------------------------------ (setq e (getvar 'cmdecho)) (setvar 'cmdecho 0) (princ "Specify first point: ") (command "_.pline" pause "_arc") (setq p (getvar 'lastpoint) a 1) (while (not done) (initget "Done Undo Lastswap") (setq o (getpoint p (strcat "\r>> Next " (if (minusp a) "LEFT" "RIGHT") " curve point or [Undo/Lastswap/Done] : "))) (cond ((not o) (setq a (* a -1))) ((= o "Undo") (if q (setq p q)) (command "_undo" "_arc")) ((= o "Done") (setq done (vl-cmdf ""))) ((= o "Lastswap") (command "_undo" "_arc" "_angle" (* (setq a (* a -1)) 30) "_non" p)) (T (command "_angle" (* a 30) "_non" (setq q p p o))))) (princ) )
Thank you for the code. I am trying to figure out how do you flip arc to the opposite side with the same angle? When I pres L it brings back standard polyline commands.
Thank you for the code. I am trying to figure out how do you flip arc to the opposite side with the same angle? When I pres L it brings back standard polyline commands.
Oops, <flip> option was removed by this site :(.
While fixing - I renamed Done to Exit and swap to flip.
<flip> be applied for next arc and stays that way
<lastflip> flips the last one and stays that way, this basically combines undo+flip+last point
<undo> <exit> are obvious.
(defun c:PLA ( / *error* e q p a o done) (defun *error* (errmsg) (if (not (wcmatch errmsg "Function cancelled,quit / exit abort,console break,end")) (princ (strcat "\nError: " errmsg))) (if e (setvar 'cmdecho e)) (princ)) ; ------------------------------------------------------------------------------------------------------------ (setq e (getvar 'cmdecho)) (setvar 'cmdecho 0) (princ "Specify first point: ") (command "_.pline" pause "_arc") (setq p (getvar 'lastpoint) a 1) (while (not done) (initget "Exit Undo flipLast") (setq o (getpoint p (strcat "\r>> Next " (if (minusp a) "LEFT" "RIGHT") " curve point or [flipLast/Undo/Exit] <flip>: "))) (cond ((not o) (setq a (* a -1))) ((= o "Undo") (if q (setq p q)) (command "_undo" "_arc")) ((= o "Exit") (setq done (vl-cmdf ""))) ((= o "flipLast") (command "_undo" "_arc" "_angle" (* (setq a (* a -1)) 30) "_non" p)) (T (command "_angle" (* a 30) "_non" (setq q p p o))))) (princ) ) <>
Oops, <flip> option was removed by this site :(.
While fixing - I renamed Done to Exit and swap to flip.
<flip> be applied for next arc and stays that way
<lastflip> flips the last one and stays that way, this basically combines undo+flip+last point
<undo> <exit> are obvious.
(defun c:PLA ( / *error* e q p a o done) (defun *error* (errmsg) (if (not (wcmatch errmsg "Function cancelled,quit / exit abort,console break,end")) (princ (strcat "\nError: " errmsg))) (if e (setvar 'cmdecho e)) (princ)) ; ------------------------------------------------------------------------------------------------------------ (setq e (getvar 'cmdecho)) (setvar 'cmdecho 0) (princ "Specify first point: ") (command "_.pline" pause "_arc") (setq p (getvar 'lastpoint) a 1) (while (not done) (initget "Exit Undo flipLast") (setq o (getpoint p (strcat "\r>> Next " (if (minusp a) "LEFT" "RIGHT") " curve point or [flipLast/Undo/Exit] <flip>: "))) (cond ((not o) (setq a (* a -1))) ((= o "Undo") (if q (setq p q)) (command "_undo" "_arc")) ((= o "Exit") (setq done (vl-cmdf ""))) ((= o "flipLast") (command "_undo" "_arc" "_angle" (* (setq a (* a -1)) 30) "_non" p)) (T (command "_angle" (* a 30) "_non" (setq q p p o))))) (princ) ) <>
Wow, it is impressive. Thank you so much. Is it a lot of work to add to the code an input where you set angle. And also you can change the angle at any time?
Wow, it is impressive. Thank you so much. Is it a lot of work to add to the code an input where you set angle. And also you can change the angle at any time?
Ok, here's an update.
Besides an angle setting also fixed multiple Undo and Exit by X or + keys.
(defun c:PLA ( / *error* e u p d o done) (defun *error* (errmsg) (if (not (wcmatch errmsg "Function cancelled,quit / exit abort,console break,end")) (princ (strcat "\nError: " errmsg))) (if u (setvar 'aunits u)) (if e (setvar 'cmdecho e)) (princ)) ; ------------------------------------------------------------------------------------------------------------ (or *pla-a* (setq *pla-a* 30.)) (setq e (getvar 'cmdecho)) (setvar 'cmdecho 0) (setq u (getvar 'aunits)) (setvar 'aunits 0) (princ "Specify first point: ") (command "_.pline" pause "_arc") (setq p (list (getvar 'lastpoint)) d 1) (while (not done) (initget "Angle Exit Undo flipLast X +") (setq o (getpoint (car p) (strcat "\nCurrent angle: " (rtos *pla-a*) "\n>> Next " (if (minusp (* d *pla-a*)) "LEFT" "RIGHT") " curve point or [Angle/flipLast/Undo/Exit] <flip>: "))) (cond ((not o) (setq d (* d -1))) ((= o "Angle") (initget 1) (setq *pla-a* (getreal (strcat "\nCurrent angle: " (rtos *pla-a*) "\nSpeficy new angle: ")))) ((= o "Undo") (if (= 1 (length p)) (princ "\nError: Can't undo last point.") (progn (setq p (cdr p)) (command "_undo" "_arc")))) ((vl-position o '("Exit" "X" "+")) (setq done (vl-cmdf ""))) ((= o "flipLast") (command "_undo" "_arc" "_angle" (* (setq d (* d -1)) *pla-a*) "_non" (car p))) (T (command "_angle" (* d *pla-a*) "_non" (car (setq p (cons o p))))))) (princ) )
Ok, here's an update.
Besides an angle setting also fixed multiple Undo and Exit by X or + keys.
(defun c:PLA ( / *error* e u p d o done) (defun *error* (errmsg) (if (not (wcmatch errmsg "Function cancelled,quit / exit abort,console break,end")) (princ (strcat "\nError: " errmsg))) (if u (setvar 'aunits u)) (if e (setvar 'cmdecho e)) (princ)) ; ------------------------------------------------------------------------------------------------------------ (or *pla-a* (setq *pla-a* 30.)) (setq e (getvar 'cmdecho)) (setvar 'cmdecho 0) (setq u (getvar 'aunits)) (setvar 'aunits 0) (princ "Specify first point: ") (command "_.pline" pause "_arc") (setq p (list (getvar 'lastpoint)) d 1) (while (not done) (initget "Angle Exit Undo flipLast X +") (setq o (getpoint (car p) (strcat "\nCurrent angle: " (rtos *pla-a*) "\n>> Next " (if (minusp (* d *pla-a*)) "LEFT" "RIGHT") " curve point or [Angle/flipLast/Undo/Exit] <flip>: "))) (cond ((not o) (setq d (* d -1))) ((= o "Angle") (initget 1) (setq *pla-a* (getreal (strcat "\nCurrent angle: " (rtos *pla-a*) "\nSpeficy new angle: ")))) ((= o "Undo") (if (= 1 (length p)) (princ "\nError: Can't undo last point.") (progn (setq p (cdr p)) (command "_undo" "_arc")))) ((vl-position o '("Exit" "X" "+")) (setq done (vl-cmdf ""))) ((= o "flipLast") (command "_undo" "_arc" "_angle" (* (setq d (* d -1)) *pla-a*) "_non" (car p))) (T (command "_angle" (* d *pla-a*) "_non" (car (setq p (cons o p))))))) (princ) )
Thank you so much. This is exactly that I needed. It is so efficient and now I can make client friendly design without taking so much time.
Thank you again.
Thank you so much. This is exactly that I needed. It is so efficient and now I can make client friendly design without taking so much time.
Thank you again.
Then use 3 points to define the arc,
with the middle pt to select which side to turn the arc,
not necessarily on the arc.
Easier to make the pline from those arcs than by a continuous create.
Then use 3 points to define the arc,
with the middle pt to select which side to turn the arc,
not necessarily on the arc.
Easier to make the pline from those arcs than by a continuous create.
That you propose is for time wasters and second, you must align middle point to make it the same unless you do approximately. Also, that is quicker do with two-click or three clicks? I don't really appreciate people who do job randomly pasting distances or objects. I appreciate people who draw lines, draw objects with meaning and accuracy without wasting time and making drawing perfect.
That you propose is for time wasters and second, you must align middle point to make it the same unless you do approximately. Also, that is quicker do with two-click or three clicks? I don't really appreciate people who do job randomly pasting distances or objects. I appreciate people who draw lines, draw objects with meaning and accuracy without wasting time and making drawing perfect.
Just for my education, why are all your light? block names unique? Kinda defeats the purpose of having a block.
Just for my education, why are all your light? block names unique? Kinda defeats the purpose of having a block.
Can't find what you're looking for? Ask the community or share your knowledge.