# Search the Community

Showing results for tags 'lee mac'.

• ### Search By Tags

Type tags separated by commas.

### Forums

• News, Announcements & FAQ
• Feedback
• AutoCAD 2D Drafting, Object Properties & Interface
• AutoCAD Drawing Management & Output
• AutoCAD 3D Modelling & Rendering
• AutoCAD Bugs, Error Messages & Quirks
• The CUI, Hatches, Linetypes, Scripts & Macros
• AutoLISP, Visual LISP & DCL
• .NET, ObjectARX & VBA
• Application Beta Testing
• Application Archive
• Other Autodesk Products
• Autodesk 3ds Max
• Autodesk Revit
• Autodesk Inventor
• Autodesk Software General
• SketchUp
• Rhino
• SolidWorks
• MicroStation
• Design Software
• Catch All
• Resources
• Tutorials & Tips'n'Tricks
• Blocks, Images, Models & Materials
• Community
• Introduce Yourself
• Showcase
• Work In Progress
• Jobs & Training
• Chat
• Competitions

### Categories

• Programs and Scripts
• Images
• Backgrounds

• 0 Replies

• 0 Reviews

• 0 Views

Found 29 results

1. ## Voltage drop calculator lisp - help

Hi every one, I am jonir an electrical engineer. I have a small idea that I like to implement .. I need a lot to calculate the length of a polyline or line that represents In my work the power consumtion next step, I calculate how meny loads on it on exel sheet and then the output is the value of the voltage drop by this equation ( 24 - I*(R/Length)* Length from drawing) 24 : Constant voltege I : sumition carrunt from different loads I choose it. R/Length : constant L: length of line or polyline from drawing. Is that possible by lisp? Best regards,
2. ## lisp for block counter an total length for all line and polyline

Is there a possibility to get lisp for block counter an total length for all line and polyline in one command ? ( export data to table ) Any ideas for merging the two lispes i attached files? CountV1-5.lsp Totallenght.lsp
3. ## error: no function definition: GETEXCEL, SOLVE THIS ERROR

I have autolisp program but when I run this program error "error: no function definition: GETEXCEL" are arrived. i also used this extension program but error is still there "http://web2.airmail.net/terrycad/LISP/GetExcel.lsp" so please help to remove this error...
4. ## LM:DisplayGrText

defun C:CR (/ PNT1 P1X P1Y STDY DY COORD PTXT) (defun *error* ( m ) (princ m) (redraw) (princ)) (while (= 5 (car (setq pnt (grread nil 13 0)))) (redraw) (setq str (mapcar 'rtos (trans (cadr pnt) 1 0))) (LM:DisplayGrText (cadr pnt) (LM:GrText (strcat "E " (car str) "\nN " (cadr str))) 3 15 -31) ) (redraw) (setq str1 (reverse (cdr (reverse str)))) (setq COORD(strcat "E " (car str)) COORD1(strcat "N " (cadr str))) (command "LEADER" (cadr pnt) PAUSE "" COORD COORD1 "" "") (princ)) ; end (princ "\n E,N CO-ORDINATES OF A POINT - Type \"CR\" to start") when i use this i cant get the snap how can i get snap with this???? http://www.lee-mac.com/grtext.html
5. ## Help pls with "Automatically Label Attributes"

I want any explain how to use "Automatically Label Attributes" LiSP, i need steps how to add serial number on pipes this LISP from LEE MAC.
6. ## Send Wipeout to Back of Draworder within Block Definition

So I have been trying to figure this out with several approaches now and I need some help. I would like to send all Wipeouts, or really any specified entity type, within a block to the back of the draw order. Is there a way to do this using Lee Mac's Apply To Block Objects routine? I tried this in conjunction with his draw order routines but the MovetoBottom command kept failing. I'm pretty rough with VisualLisp which is part of the issue when trying to troubleshoot his great routines. Or what about this approach? (I dont really understand it, again Visual Lisp) Below is what I tried. I do understand Vanilla Lisp. Visual Lisp I barely know the basics, but eager to learn. Please help me improve my capabilities. I love autolisp. Thank you. The issue is clearly with the lambda function and my improper use of it Im sure. The ssget I am trying to do is incorrect approach for use with his function. ;=========================================================== ; 11/Sep/2020 10:09 AM[Friday] AUTHOR: Brandon Gum ;-- ;DESCRIPTION: ;Select block with wipeout. ;Will send wipeout objects the back of the draw orer ;=========================================================== (defun c:test ( / s ) (princ "\nSelect Block: ") (if (setq s (ssget "_+.:E:S" '((0 . "INSERT")))) (LM:ApplytoBlockObjects (vla-get-blocks (vla-get-activedocument (vlax-get-acad-object))) (vla-get-effectivename (vlax-ename->vla-object (ssname s 0))) '(lambda ( obj ) (BG:WipeoutToBottom)) ) ) (princ) ) (vl-load-com) (princ) (defun BG:WipeoutToBottom( / ) (LM:movetobottom (ssget "X" '((0 . "WIPEOUT")))) ;(princ) );end of defun ;===============Below here are Lee's draw order functions============== My LeeMac Based Approach.LSP
7. ## Text Calculator

Hey Guys! I found an awesome lisp file for my work(Lee Mac's Text calculator) and i started using it.It adds numerical text and place the result.But my cad project consists many numbers and I can't separate the selected number from the unselected one.Can any one update it to change the color after the text is selected. please It's urgent!!! TextCalc.lsp
8. ## LISP to move nested entity

Hi Please could someone assist with modifying an existing routine that moves a nested entity (NestedMoveV1-2.lsp by Lee Mac). This is an awesome routine, and I have looked into the code, but unfortunately I am still too new to LISP to make any progress. If someone could perhaps show me how to modify the routine to do the following , I would really appreciate it: 1. Enable the entity being moved to be visually "dragged" with the cursor (perhaps this has somehting to to with DRAGMODE system variable?) - this would enable me to accurately place the entity in the new position while taking into account any adjacent objects in the drawing. 2. Is it possible to have this work with dynamic blocks as well? Looking forward to your replies NestedMoveV1-2.lsp

11. ## Add to Block By Lee Mac

All, I was wondering if anyone else was having a problem using Lee Mac's "Add to Block " on a dynamic block? Recently our title blocks have changed over to dynamic and now I cant use "Add to block" anymore. Thanks, Brian

13. ## Lee Mac's Tip of the day not working

Hello all. First off let me thank Lee Mac for all that he does with LISP and how he helps others out. He is a great value to the community. Now for the question I have been trying to get his Tip of the day lisp working. I have the lisp in my startup suite, it and the text file are both in a support file search path, and it does not show a tip at the start of the day. The Lisp does load because I can type (LM:tip) and it shows a tip, it just does not show anything for the first dwg of the day. Could the issue be that I am using Civil 3D 2015, maybe so variable that is causing the problem? http://www.lee-mac.com/tipoftheday.html
14. ## Modification to a Lee Mac Auto-labeling Lisp

Hey guys, So thanks to Lee Mac, I've got this stellar labeling LISP that works for a variety of situations. I need help throwing one more situation into the mix. I'd like it to have different behavior when labeling the block named "Symbol - Tree CRZ". Within this block, there is a User Parameter called "PercentImpacted" that uses an expression based on other user parameters to return a specific value. For this block, I need the leader text to say: "[Value from PercentImpacted parameter to 1 decimal place] + "% CRZ" Ex: I'd like the leader to work how the hatch component of the LISP works, wherein it asks for the user to specify the arrowhead location, rather than auto-starting at the block insertion point. And it should still allow for pickfirst action like the block labeling component does. Mega bonus points if there's a way to make the value in the leader a field that would update if the value of the user parameter changed. If pulling data directly from user parameters like this isn't possible, I can add an attribute that pulls the value from the parameter, and then the label could pull from the attribute. And commented code would would be awesome so I can unravel what does what. Trying to learn, slowly...
15. ## Combine Two Lisp Programmes

I have two Lisp Programmes with me, One of those LISP is downloaded from LEEMAC 1st Lisp gives the hatch area as text in AutoCAD drawing 1 - Areas2FieldV1-3.lsp 2nd Lisp gives an output as .txt file when you click two text objects in the drawing 2 - 2str.lsp I want to combine those 2 lisp programmes into one. Expecting output : Every hatch has individual survey numbers, by selecting the survey number & respective hatch, Result should be survey Number, Hatch Area. Is it Possible ?? Very Very Urgent for me.:(
16. ## Need help combing two Lee Mac LISPS

Hey guys! So the amazing Lee Mac wrote two different versions of a LISP based on a request I posted. Workflow demands have changed and now I need to modify the lisp to be somewhere in between the two versions. Version 1 & Version 2. For the combo lisp, I need: The block multileader to populate from the block's description, rather than name (like it does in Version 1). If there is no description, then the contents should default on block name (not from either version, but it would be helpful. I'm not sure how tricky it would be to code) The block multileader to automatically start at the block's insertion point (like it does in Version 2). The hatch multileader component is perfect in both versions (pulling the name and prompting for first click as insertion point) I tried fiddling around with it, but am too much of a noob to really make heads or tails of what's going on between the two versions (to my amateur eyes, the methods used between the two are too different for me to reconcile). Thanks for any help!
17. ## Batch Attibute Editor

Hi Lee, been using this code in daily basis, Just a quick question. Would it be possible to add "plot to PDF" after it changes the attribute values? http://www.lee-mac.com/batte.html
18. ## Layer Lisp Question

I have a Lisp from Lee Mac which I would like to be modified. I would like to have a setting that let's you choose which layer it should be on. I have tried to write something myself and only came up with this: ****************************************************************** (setq TASH (getint "\nChoose dimensions layer: Dim. (1), Front view (2)")) ); end while ); progn );TASH = 1, Dim (if (= TASH 1 ) (progn ; S-Dimensions (command "DIM*" "S-DIMENSIONS" "Dimension Layer" 3 "Continuous" -3 1 nil ) ); progn ); if (= TAMR 1) ****************************************************************** and: ****************************************************************** (defun CommandReactor:CommandWillStart (rea cmd) (if (wcmatch (strcase (car cmd)) "*DIM*") (progn (setq *OldClayer* (getvar 'clayer)) (vla-add (vla-get-layers (vla-get-activedocument (vlax-get-acad-object))) (setq TASH (getint "\nChoose dimensions layer: Dim. (1), Front view (2)")) ); end while (setvar 'clayer layerName) ) ) ) ****************************************************************** But I don't know were to put it in the existing lips from Lee Mac. Can anyone help? The lisp from Lee Mac is now; ****************************************************************** http://lee-mac.com/lisp/html/LayerDirectorV1-4.html ****************************************************************** Thanks!! Ps. Check out Lee Mac's lisps!
19. ## for geting ellipse minor and major width.

hello sir, I have a selection set consists of number of ellipse I want to get center point, minor width and major width of each ellipse and stored in excel file. please help regarding this.....
20. ## extract all coordinate and dimension from autocad drawing

i want to extract all coordinate and dimension from AutoCAD drawing(attached file) i am using below code they extract only circle dimension, what can i do to extract other dimension.. (vl-load-com) (defun c:test (/ i e p1 p2 ss lst q var f fn dat dat1) ;hanhphuc 2014 (set 'var (getvar 'cmdecho )) (setvar 'cmdecho 0) (if (and (setq e (entsel "\nPlease select solid.. ")) (setq e (car e)) (= (cdr (assoc 0 (entget e))) "3DSOLID")) (progn (vla-GetBoundingBox (setq obj (vlax-ename->vla-object e)) 'p1 'p2) (mapcar ''((a b) (set a (vlax-safearray->list b))) '(p1 p2) (list p1 p2)) (command "_explode" e) (setq i 0 ss (ssget "C" p1 p2) lst (mapcar '(lambda(x) (setq q nil) (if (= (cdr (assoc 0 (entget x))) "REGION") (setq q (cons (LM:reg x) q)) (setq q (cons (vlax-ename->vla-object x) q)) ) (if (listp q) (LM:flatten q) q ) ) (vl-remove-if 'listp (mapcar 'cadr (ssnamex ss))) ) ;_ end of mapcar ) ;_ end of setq (foreach o (vl-remove-if-not ''((x) (= (vla-get-ObjectName x) "AcDbCircle")) (LM:flatten lst)) (setq dat(cons (princ (strcat "\nCIRCLE_" (itoa (setq i (1+ i))) " " (vl-princ-to-string (mapcar ''((x)(vlax-get o x)) '(Radius Center)) ))) dat)) ) ;_ end of foreach (command "_.U") (setq fn (strcat (getvar "dwgprefix") "hole dat.csv") f (open fn "w")) ; If you don't want to override file ,to append use (open fn "a") as suggested by Marko @ post#14 (foreach \$ (foreach x dat (setq dat1 (cons (vl-string-translate " " "," (vl-list->string (vl-remove-if ''((a) (or (= a 10) (= a 40) (= a 41))) (vl-string->list x)) ) ;_ end of vl-list->string ) ;_ end of vl-string-translate dat1 ) ;_ end of cons ) ;_ end of setq ) ;_ end of foreach (write-line \$ f)) (write-line " " f) (if f (close f)) (startapp "notepad" fn) ; ) ;_ end of progn ) ;_ end of if (setvar 'cmdecho var) (princ) ) ;_ end of defun ;;;http://www.cadtutor.net/forum/showthread.php?35506-How-to-get-Region-coordinates/page2 ;;;adopted as sub-function (defun LM:reg (reg / RetObj) (setq Reg (vlax-ename->vla-object reg)) (if (vlax-method-applicable-p reg 'explode) (progn (setq RetObj (vlax-safearray->list (vlax-variant-value (vla-explode Reg)))) (repeat (length RetObj) (if (eq "AcDbRegion" (vla-get-ObjectName (car RetObj))) (setq RetObj (append RetObj (vlax-safearray->list (vlax-variant-value (vla-explode (car RetObj)))))) (setq RetObj (append RetObj (list (car RetObj)))) ) ;_ end of if (setq RetObj (cdr RetObj)) ) ;_ end of repeat ) ) retobj ) ;_ end of defun ;; Flatten List - Lee Mac ;; Transforms a nested list into a non-nested list ;; http://www.lee-mac.com/flatten.html (defun LM:flatten ( l ) (if (atom l) (list l) (append (LM:flatten (car l)) (if (cdr l) (LM:flatten (cdr l)))) ) )
21. ## selection set of line, circle, arc, polyline from autocad 3D object

i have a 3D object in autocad and i want to create selection set of line, circle, arc, polyline of that object using visual lisp. please help.. thanks in advance... Drawing1.dwg
22. ## extract length, width and thickness from 3d object of autocad...

i need help to extract length, width and thickness from 3-D constant thickness object using visual lisp... and showing this L, B & T value in file...