Search the Community
Showing results for tags 'autolisp programs'.
-
AutoLISP for designing a water supply and sewerage system in our floor plan.
Maria_Kar posted a topic in AutoLISP, Visual LISP & DCL
Hi to all. I really appreciate the content of this page and so I wanted to ask if anyone has any idea how we could use AutoLISP to design a water supply and sewerage system in our floor plan. Thanks in advance. -
How to create a Amnote in AutoCAD Mechanical
muhammad_rp posted a topic in AutoLISP, Visual LISP & DCL
hi guys, my name is ramdan i live in Indonesia, I want to Ask, how to make amnote in AutoCAD Mechanical with Autolisp ? thanks,- 1 reply
-
- autolisp programs
- autolisp code problems
- (and 3 more)
-
Just thought I'd share a routine I created yesterday - I hope others find it useful. Sometimes I run into situations where I need to move portions of my model great distances, and I have to spend a few minutes each time updating the viewport so that my leaders and tags in paperspace line up with the shifted model. The only technique I found was this one, which isn't very practical when I'm moving things a thousand odd feet away. Here's how the LISP works. You go to modelspace and draw a line between the old location and the new one. Then you go to paperspace and enter the viewport you need to update. Simply start the command with "PANLINE", and click on the line. I've also included an option to reverse the pan direction depending on which way you drew the line, and a warning if the viewport is locked. Here's the code: (defun c:PANLINE ( / lock flag alrt line p1 p2 option) ;Pans from one end of a line to another. ;Useful for updating a viewport when objects in modelspace have been moved. ;Created by Perry Lackowski on 12/22/2016 (VL-LOAD-COM) (setq lock (VLA-GET-DISPLAYLOCKED (VLA-GET-ACTIVEPVIEWPORT (VLA-GET-ACTIVEDOCUMENT (VLAX-GET-ACAD-OBJECT))))); (setq alrt (VL-SYMBOL-NAME lock)) (IF (= alrt ":vlax-true") (princ "\nCannot pan inside a locked viewport") (progn ;Prevents the rest of the code from running if an active viewport is locked. (setq flag f) (while (not flag) (setq line (car (entsel "\nSelect Line : "))) (cond ( (null line) (princ "\nNothing selected, Please try again.") ) ( (= (cdr (assoc 0 (entget line))) "LINE") (setq flag t) ) ( t (princ "\nSelected object is not line, Please try again.")) ) ) (setq p1 (cdr (assoc 10 (entget line)))) (setq p2 (cdr (assoc 11 (entget line)))) ;retrieves the contents of group codes 10 and 11 which contain the first and second point of the line. (command ".-pan" p2 p1) (princ "Reverse direction [Yes/No] <No>:") (initget 6 "Yes or No") (setq option (getkword "\nReverse pan direction? (Yes/No) <No>: ")) (if (= option "Yes") (progn (command ".-pan" p1 p2) (command ".-pan" p1 p2) ) ) (princ "\nPan complete.") ));end progn/if (princ) );end defun
-
Autolisp nesting polylines in various rectangle
LULU1965 posted a topic in AutoLISP, Visual LISP & DCL
I introduce myself my name is Luciano and 30 years working on 2d and 3d. I have a problem that now haunts for years and only you "GURU" of the Lisp language you can perhaps bring myself giving me a great mano.Vi thank you in advance. special nesting.dwg -
Hi, I'm trying to create a routine to draw trapezoidal threads in Adcad2000. I don't understand why it does not work. Can someone help me? I really appreciate, hugs. Code: ;Program that subtracts a 'cut entity' of a cylinder, shifts it along ;and turns it to make new cut, "N" times each "M" turns. ;Requirements: horizontal cylinder axle and load of "geom3d.arx" (Acad2000). (DEFUN C:LATHE (/) (Setq AUN (getvar "aunits")) (setvar "aunits" 0) (progn (setq Cylinder (entsel "\nClik the Cylinder to 'lathe': ")) (setq PtoA (GETPOINT "\nClick at START (center) of Cylinder: ")) (setq PtoB (GETPOINT "\nClick at END of Cylinder (center): ")) (setq CutEntity (entsel "\nSelect a 'CUT-ENTITY': ")) (princ "\nTotal Number of TURNS (spiral): ") (setq NTv (getint)) (setq Nv 1) (princ "\nHow many CUTS by TURN (resolution): ") (setq NCv (getint)) (setq Nc 1) (setq Step (/ (distance PtoA PtoB) (* NCv NTv))) (setq AngularStep (/ 360 NCv)) (setq PtoC (polar PtoA (angle PtoA PtoB) Step)) (while (>= NTv Nv) (while (>= NCv Nc) (command "copy" CutEntity "" "0,0,0" "0,0,0") (command "subtract" Cylinder "" CutEntity "") (command "move" Cylinder PtoC PtoA) (command "rotate3d" Cylinder PtoA PtoB AngularStep) (setq Nc (+ Nc 1)) ) (setq Nv (+ Nv 1)) (setq Nc 1) ) ) (setvar "aunits" AUN) )
- 4 replies
-
- spiral
- solid threads
-
(and 2 more)
Tagged with:
-
Hello everyone!! I am a rookie in autolisp. I need help in figuring this out.. I wish to find Mtext "J" of a particular style (say ROMANS) in the drawing and retrieve its position (x,y coordinates). I am trying to replace all the occurrences of the text with a block (say "star") at their respective locations. I found lisp programs to find text, but i cant seem to figure out how to use its attributes to proceed further. eagerly awaiting responses...
- 14 replies
-
- properties
- find
-
(and 2 more)
Tagged with:
-
Dear People, CADTutor has got a name in the AutoCAD community. I was at your web site. I saw your forum. I'm a mem ber of your forum.. You also have a forum that is dealing witgh AutoLISP, Visual LISP & DCL. I did not see AutoLISP programs there. But. I'm wondering. Are you interested in AutoLISP programs? Do you want to publish them? I have written many AutoLISP programs. I'm still writing AutoLISP programs. What is more. I'm writing articles about my AutoLISP programs. I publish them on my blog. If you want to see what I have got. Here is the website of my blog. http://www.speedupautocad.blogspot.com/ If you are interested, let me know. I could send you my articles. Let me know where I can send them to. And what format you want: DOC or text. Jos van Doorn SpeedUpAutoCAD
-
- autolisp articles
- autolisp
-
(and 1 more)
Tagged with: