Jump to content

Search the Community

Showing results for tags 'leader'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • CADTutor
    • News, Announcements & FAQ
    • Feedback
  • AutoCAD
    • AutoCAD Beginners' Area
    • AutoCAD 2D Drafting, Object Properties & Interface
    • AutoCAD Drawing Management & Output
    • AutoCAD 3D Modelling & Rendering
    • AutoCAD Vertical Products
    • AutoCAD LT
    • CAD Management
    • AutoCAD Bugs, Error Messages & Quirks
    • AutoCAD General
    • AutoCAD Blogs
  • AutoCAD Customization
    • 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
  • Other CAD Products
    • BricsCAD
    • SketchUp
    • Rhino
    • SolidWorks
    • MicroStation
    • Design Software
    • Catch All
  • Resources
    • Tutorials & Tips'n'Tricks
    • AutoCAD Museum
    • Blocks, Images, Models & Materials
    • Useful Links
  • Community
    • Introduce Yourself
    • Showcase
    • Work In Progress
    • Jobs & Training
    • Chat
    • Competitions


  • Programs and Scripts
  • 2D AutoCAD Blocks
  • 3D AutoCAD Blocks
  • Images
    • Backgrounds

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...

Found 31 results

  1. ILoveMadoka

    Gap Between Leader and Text Setting?

    Do any of the settings control the spacing between the end of the leader and the start of the text? Solidworks 2018
  2. ILoveMadoka

    Gap Between Leader and Text Setting?

    Is there a setting to adjust or increase this gap? Solidworks 2018 Font = swromans
  3. Dear all, I'm looking for a simple lisp (probably vlisp) routine that can select all leaders of the same type (e.g dot). In other words, i only want to select the dot leaders of all my leaders in the drawing file. Should look something like this: (ssget "x" ("leader")) and ('leadertype 3) Thanks
  4. I have a legacy drawing where someone has changed some of the leader arrows to dots but they are using the wrong symbol and wrong size. I can select the leader in question and change the properties of these two items in the Properties dialog. Can this be accomplished via lisp? (Command "xxxx" "Dot") ; Or (Setvar "xxxx" "Dot") (Command "dimasz" .09375) Properties says it is a Leader I really would prefer to not make a whole new Style for these items but there are so many that need to be changed scattered across the many sheets, that it would be a huge time saver with a small routine.. I don't see it here.. (setq XD (entget (car (entsel)))) * List in AutoLISP format *((-1 . <Entity name: 29f052416f0>) (0 . LEADER) (330 . <Entity name: 29ed564db80>) (5 . C0C37) (100 . AcDbEntity) (67 . 1) (410 . SH65H) (8 . Text) (100 . AcDbLeader) (3 . STANDARD) (71 . 1) (72 . 0) (73 . 3) (74 . 1) (75 . 0) (40 . 0.0) (41 . 0.0) (76 . 3) (10 4.33416 8.92996 0.0) (10 4.61755 10.2826 0.0) (10 4.73268 10.2826 0.0) (340 . <Entity name: 0>) (211 1.0 0.0 0.0) (210 0.0 0.0 1.0) (212 0.0 0.0 0.0) (213 0.0 0.0 0.0)) Variable name is ENT or here.. (entget (car (entsel)) '("ACAD")) Select object: ((-1 . <Entity name: 29f052416f0>) (0 . "LEADER") (330 . <Entity name: 29ed564db80>) (5 . "C0C37") (100 . "AcDbEntity") (67 . 1) (410 . "SH65H") (8 . "Text") (100 . "AcDbLeader") (3 . "STANDARD") (71 . 1) (72 . 0) (73 . 3) (74 . 1) (75 . 0) (40 . 0.0) (41 . 0.0) (76 . 3) (10 4.33416 8.92996 0.0) (10 4.61755 10.2826 0.0) (10 4.73268 10.2826 0.0) (340 . <Entity name: 0>) (211 1.0 0.0 0.0) (210 0.0 0.0 1.0) (212 0.0 0.0 0.0) (213 0.0 0.0 0.0) (-3 ("ACAD" (1000 . "DSTYLE") (1002 . "{") (1070 . 41) (1040 . 0.09375) (1070 . 40) (1040 . 1.0) (1070 . 49) (1040 . 0.1875) (1070 . 341) (1005 . "5AE25") (1070 . 345) (1005 . "12") (1070 . 346) (1005 . "12") (1070 . 347) (1005 . "12") (1002 . "}")))) Arrow size? (1040 . 0.1875) Do you use (entmod) to change?? I've looked here for some insight (It is not obvious to me..) Autocad 2018 DXF Group Codes This is beyond me I'm lost... (I am trying though) Help please?
  5. Hello, Does anyone know how can i set to default Not to have Multi leader text sitting on the line ? i want to be able to set it in the Multi leader setting window, i want to keep it the same each time. see issue on pic. thank you. Note Autocad 2017
  6. Had to rotate a floorplan 180 along with all multileaders and text. I can easily select multileaders and change angle to 0 in Properties but text ends up on top of leader or in wrong position relative to leader. It would be great to have a command able to select a group of multileaders and step through them rotating them a desired angle about the end of the leader. Any takers? Thanks!
  7. Hi all, It`s been a while. Does anyone have a lisp to show on a leader the visibility state of a dynamic block? Cheers
  8. Hello All! I would like to add another command to the pop up sub-menu (see attached image) that come up when you place your courser over a leader. I would like ADD the option to remove a leader right in this sub-menu. Is this possible? Here is the command that I think I need to add to this menu. ^C^C_MLEADEREDIT _R If this possible how do I get it done? Thanks in advanced.
  9. Hello, My manager made this LSP file for me and it doesn't work and we are both not sure why. Seems correct to me. How it works: Creates the E-Anno-Note layer, otherwise makes it current, then creates an MLeader (to avoid creating leaders on incorrect layers). (DEFUN C:NN () (setvar "cmdecho" 0) (if (not (tblsearch "layer" "E-Anno-Note")) (command "-layer" "n" "E-Anno-Note" "c" "2" "E-Anno-Note" "")) (command "-layer" "m" "E-Anno-Note") (COMMAND "mleader") (princ) ) Thanks!
  10. Hi everyone, I have a quite a specific question relating to auto-filling fields that are inserted into text. To give you some context I work in the lighting design industry and draw 2D lighting layout plans. I am currently trying to build a collection of dynamic blocks which contain attributes relating to their reference letter, circuit number, location, etc etc. This bit I have done quite easily. I plan to use these attributes to export to excel later, again something I already have working. The way our company labels the light fittings on plan is to use a leader. However if I have already given the block the information it requires for it attributes (and excel usefulness) I don't want to spend time typing it all out again in the leader. I have inserted some fields into my leader that recall the information I have stored in the block attributes but it is probably slower to insert them and click through the Field dialogue box than it is to just type in manually! What I want is to be able to have a generic leader with the fields that will refer to any given block (using the same names for those attributes) that when, for example the tip of the leader arrow touches a specific block the fields know that is the object they need information from, that way I don't have to right click each field and re-select the block manually. I just need a way of making this a one action process for each leader instead of having to do it for each field within it. I hope this makes sense to someone, more than happy to try and explain better if not! Many thanks, Matt
  11. I've only been learning LISPing for a few weeks so C&C's are most welcome. LINK TO VIDEO: One of my most used LISPs is the LeaderToMleader.LSP. Found here. It was last updated many moons ago, so I decided to try learn and modify it to suit. Many thanks to the original author Lyle Hardin. I just need some guidance on how to get UCS working with it. EDIT. Using the TRANS fn. It works okay. Took a bit of tweaking but I got it. Please test. Here's a list of things I've changed at the top of the code: Main ones are: Multiple Selection - User can now select the LEADER and MTEXT together and no longer individually resulting in a much faster conversion. Strip text - Of formatting option - LM:UnFormat fn written by LeeMac. Annotation support - Program simply matches the (entget) object to that of the (entlast) object. With the help of AT:isAnnotative written by Alan J. Thompson. Case conversion - Built in fns using (load "TcaseSup.lsp") - OPTIONS: Titlecase Lowercase Uppercase Sentencecase toGglecase Keepcase Verts - Leader_To_Multileader now supports 2 or 3 points. (Old method was only 2). It uses the 1st, 2nd (if applicable) and last verts of the LEADER. The 4th vert or more, will get removed. Text Rotation - MTEXT rotation is now preserved. Undo levels - As opposed to one command at a time. PS. How easy would it be to calculate the distance between the start point of the LEADER point and pos of the MTEXT and then for each of the closest pairs make them an MULTILEADER. That would be cool. ;;; CADALYST 08/08 www.cadalyst.com/code ; Tip 2305: Leader_To_Multileader.lsp LEADER to Multileader (c) 2008 Lyle Hardin ; Pick an old style LEADER and text to create a new MLEADER entity and erase the old LEADER and text. ; March/2008 ;;; EDITED ON 15/04/2017 BY 3DWANNAB ; Reason for creating this, was to learn and create a LISP that I use on a regular basis. ; Commandline Syntax: Type "Leader_To_Multileader" OR "LTM" to run Program. ; ; ADDED - Case Conversion. ; OPTIONS: ; Titlecase Lowercase Uppercase Sentencecase toGglecase Keepcase. ; ; ADDED - Annotation support. Program simply matches the (entget) object to that of the (entlast) object. With the help of AT:isAnnotative written by Alan J. Thompson. ; ADDED - Custom LM:ssget fn written by LeeMac. ; ADDED - Multiple Selection. User can now select the LEADER and MTEXT together and no longer individually resulting in a much faster conversion. ; ADDED - Round off points - To nearest round number. That been 1. round fn written by Doug Broad. Additional credits to Joe Burke, Peter Toby. ; ADDED - Strip MTEXT - Of formatting option - LM:UnFormat fn written by LeeMac. ; ADDED - Text Rotation - MTEXT rotation is now preserved. ; ADDED - Undo levels - As opposed to one command at a time. ; ADDED - Picking of existing MLEADER to use as new style. ; RMB-SPACEBAR-ENTER to skip this step and use the current MLEADER style ; SETTINGS TRANSLATED IF PICKED: ; (vla-put-Layer newmleader existingMlLayer) ; (vla-put-ScaleFactor newmleader existingMlScale) ; (vla-put-StyleName newmleader existingMlStyle) ; (vla-put-TextWidth newmleader existingMlWidth) ; ; SETTINGS TRANSLATED IF NOT: ; (vla-put-Layer newmleader existingTxtLayer) ; (vla-put-TextRotation newmleader existingTxtRot) ; (vla-put-TextWidth newmleader existingTxtWidth) ; ; CHG - Changed to 'vla-get-TextString' as more robust. ; CHG - Moved new MLEADER to TEXT Layer as opposed to existing LEADER. ; CHG - Picking never fails, prompts user to keep picking until successful. LM:SelectIf fn written by LeeMac. ; FIX - ACADs built in functions to convert ill-formatted MTEXT creates a bug in the string result. LM:StringSubst by LeeMac. ; FIX - End position of MLEADER. ; FIX - Z coordinate to 0, resulting in no fuzzy text. ; FIX - Forces the MLEADER to be created from the 'LEADER arrowHead first' resulting in correct results all the time. ; FIX - Vertices, Leader_To_Multileader now supports 2 or 3 points. ; If 2 (Straight) it straightens the MLEADER up to the Y axis of the LEADER point for those LEADERS at an angle. ; If 3 (Dog Legged) it recreates those as they originally were. ; If <3 (Multiple) it recreates the 1st, 2nd & end point point of the original LEADER. The 4th vert or more, will get removed. ; NOTE: Not really any need for more than 3 points on an MLEADER, I don't think. ; ;;; KNOWN QUIRKS, BUGS ; Works in different UCSs, if you are fixing MTEXT & LEADERS which are upside down then the new MLEADER might be a little wacky. ; ;;; FUTURE ADDITIONS ; Convert based on how close the LEADER and MTEXT are away from each other. To enable multiple selection. ; ;;; COMMENT OUT ; First off, Big THANKS to Lyle Hardin for the original code. ; Big THANKS to LeeMac for the functions he has put up on his website. ; Finally getting the basics of this LISP'ing lark thanks to guys like him. ; Lots of other places on forums and Users too. To many users to mention. ; Let me know your thoughts on this Program or if you want to drop a Thank you. ; e. stephensherry147@yahoo.co.uk (defun c:LTM nil (c:Leader_To_Multileader)) (defun c:Leader_To_Multileader ( / *error* cmde entLeader entLeaderName entTxt entTxtName entTxtVlaObj existingMlScale existingMlStyle existingMlvlaObj existingMlWidth existingTxtLayer existingTxtRot existingTxtString existingTxtWidth ldxf10_1 ldxf10_2 ldxf10_last lstleaderlen lstleaderpts os ss1 ss2 ) (defun *error* (errmsg) (and acDoc (vla-EndUndoMark acDoc)) (and errmsg (not (wcmatch (strcase errmsg) "*CANCEL*,*EXIT*")) (princ (strcat "\n<< Error: " errmsg " >>")) ) (setvar 'cmdecho cmde) (setvar 'osmode os) ) (setq acDoc (vla-get-ActiveDocument (vlax-get-acad-object))) (or (vla-EndUndoMark acDoc) (vla-StartUndoMark acDoc)) (setq cmde (getvar "cmdecho")) (setq os (getvar "osmode")) (setvar 'cmdecho 0) (setvar 'osmode 0) (if (setq ss1 (car (LM:SelectIf (strcat "\nSelect an existing MULTILEADER to use as the new style\nor RMB-SPACEBAR-ENTER to use current: '" (getvar "cmleaderstyle") "'." ) (lambda ( x ) (eq "MULTILEADER" (cdr (assoc 0 (entget (car x)))))) entsel nil ) ) ) (progn (setq existingMlvlaObj (vlax-ename->vla-object ss1) existingMlLayer (vla-get-Layer existingMlvlaObj) existingMlStyle (vla-get-StyleName existingMlvlaObj) existingMlWidth (vla-get-TextWidth existingMlvlaObj) ) (if (/= T (AT:isAnnotative ss1)) (setq existingMlScale (vla-get-ScaleFactor existingMlvlaObj)) ) (princ (strcat "\nStyle to use: ' " existingMlStyle " '")) ) ) (initget "Titlecase Lowercase Uppercase Sentencecase toGglecase Keepcase") (setq ansCase (cond ( (getkword (strcat "\nChoose Text Case : [Title case/Lower case/Upper case/Sentence case/toGgle case/Keep case] <" (setq ansCase (cond ( ansCase ) ( "Keepcase" )) ) ">: " ) ) ) ( ansCase ) ) ) (initget "Keepformatting Removeformatting") (setq ansFromatting (cond ( (getkword (strcat "\nChoose Formatting : [Keep formatting/Remove formatting] <" (setq ansFromatting (cond ( ansFromatting ) ( "Keepformatting" )) ) ">: " ) ) ) ( ansFromatting ) ) ) (while (setq ss2 (LM:ssget "\nSelect 1 LEADER & 1 MTEXT: " (list "_:L" (append '( (-4 . "<OR") (0 . "MTEXT") (0 . "LEADER") (-4 . "OR>") ) ) ) ) ) (if (/= (sslength ss2) 2) (progn (alert "Select only 1 MTEXT and 1 LEADER.") (princ " >>> 'LTM' failed selection, try again ...")(princ) ) (progn (if (= (cdr (assoc 0 (entget (ssname ss2 0)))) "LEADER") (setq entLeader (entget (ssname ss2 0)) entTxt (entget (ssname ss2 1)) ) (setq entLeader (entget (ssname ss2 1)) entTxt (entget (ssname ss2 0)) ) ) (if (or (and (eq (dxf 0 entLeader) "LEADER") (eq (dxf 0 entTxt) "LEADER")) (and (eq (dxf 0 entLeader) "MTEXT") (eq (dxf 0 entTxt) "MTEXT"))) (progn (alert "Please, check your Selection !\n\nSelect only 1 MTEXT and 1 LEADER.") (princ " >>> 'LTM' failed selection, try again ...")(princ) ) (progn (setq entLeaderName (dxf -1 entLeader) entTxtName (dxf -1 entTxt) existingTxtLayer (dxf 8 entTxt) entTxtVlaObj (vlax-ename->vla-object entTxtName) existingTxtString (vla-get-TextString entTxtVlaObj) existingTxtWidth (dxf 41 entTxt) existingTxtRot (dxf 50 entTxt) lstleaderpts (vl-remove-if-not '(lambda (p) (eq (car p) 10)) entLeader ) lstleaderlen (length lstleaderpts) ldxf10_1 (cdr (car lstleaderpts)) ldxf10_1 (mapcar '(lambda (x) (round x 1) ) ldxf10_1 ) ldxf10_2 (if (>= lstleaderlen 3) (cdr (nth (- lstleaderlen 2) lstleaderpts)) ) ldxf10_2 (mapcar '(lambda (x) (round x 1) ) ldxf10_2 ) ldxf10_last (if (< lstleaderlen 3) (list (car (dxf 10 entTxt)) (cadr ldxf10_1) (caDDr (dxf 10 entTxt))) (list (car (dxf 10 entTxt)) (cadr ldxf10_2) (caDDr (dxf 10 entTxt))) ; (list (car (dxf 10 entTxt)) (cadr ldxf10_1) 0) ; (list (car (dxf 10 entTxt)) (cadr ldxf10_2) 0) ) ldxf10_last (mapcar '(lambda (x) (round x 1) ) ldxf10_last ) ) (cond ((= "Keepformatting" ansFromatting) ) ((= "Removeformatting" ansFromatting) (setq existingTxtString (LM:UnFormat existingTxtString nil)) ) ) (progn (if (>= lstleaderlen 3) (progn (command "._MLEADER" "_L" "_H" "_O" "_M" 3 "_A" "_N" "_X" "_non" (trans ldxf10_1 0 1) "_non" (trans ldxf10_2 0 1) "_non" (trans ldxf10_last 0 1) "") ) (progn (command "._MLEADER" "_L" "_H" "_O" "_M" 2 "_A" "_N" "_X" "_non" (trans ldxf10_1 0 1) "_non" (trans ldxf10_last 0 1) "") ) ) (setq newmleader (vlax-ename->vla-object (entlast))) (cond ((= "Titlecase" ansCase) (setq existingTxtString (acet-tcase-change-string existingTxtString "TITLE")) ) ((= "Lowercase" ansCase) (setq existingTxtString (acet-tcase-change-string existingTxtString "LOWER")) ) ((= "Uppercase" ansCase) (setq existingTxtString (acet-tcase-change-string existingTxtString "UPPER")) ) ((= "Sentencecase" ansCase) (setq existingTxtString (acet-tcase-change-string existingTxtString "SENTENCE")) ) ((= "toGglecase" ansCase) (setq existingTxtString (acet-tcase-change-string existingTxtString "TOGGLE")) ) ((= "Keepcase" ansCase) (setq existingTxtString existingTxtString) ) ) (setq existingTxtString (LM:StringSubst "\\\H" "\\\h" existingTxtString)) (vla-put-TextString newmleader existingTxtString) (vla-put-TextRotation newmleader existingTxtRot) (if ss1 (progn (command "._MATCHPROP" ss1 (entlast) "") (vla-put-TextWidth newmleader existingMlWidth) ; (vla-put-StyleName newmleader existingMlStyle) ; (vla-put-Layer newmleader existingMlLayer) (if (/= T (AT:isAnnotative ss1)) (vla-put-ScaleFactor newmleader existingMlScale) ) ) (progn (vla-put-Layer newmleader existingTxtLayer) (if (/= existingTxtWidth 0) (vla-put-TextWidth newmleader existingTxtWidth) ) ) ) (command "_.erase" entTxtName "") (command "_.erase" entLeaderName "") (command "_.move" (entlast) "" '(0 0 1e99) "" "_.move" "_p" "" '(0 0 -1e99) "") (princ " >>> 'LTM' has done the business ...")(princ) ) ) ) ) ) ) (*error* nil) (princ) ) ;; Unknown Autor (defun dxf (code elist) (cdr (assoc code elist)) ) ;; Doug Broad ;; additional credits Joe Burke, Peter Toby (defun round (value to) (setq to (abs to)) (* to (fix (/ ((if (minusp value) - +) value (* to 0.5)) to))) ) ;;--------------------=={ String Subst }==--------------------;; ;; ;; ;; Substitutes a string for all occurrences of another ;; ;; string within a string. ;; ;;------------------------------------------------------------;; ;; Author: Lee Mac, Copyright © 2011 - www.lee-mac.com ;; ;;------------------------------------------------------------;; ;; Arguments: ;; ;; new - string to be substituted for 'old' ;; ;; old - string to be replaced ;; ;; str - the string to be searched ;; ;;------------------------------------------------------------;; ;; Returns: String with 'old' replaced with 'new' ;; ;;------------------------------------------------------------;; (defun LM:StringSubst ( new old str / inc len ) (setq len (strlen new) inc 0 ) (while (setq inc (vl-string-search old str inc)) (setq str (vl-string-subst new old str inc) inc (+ inc len) ) ) str ) ;; ssget - Lee Mac ;; A wrapper for the ssget function to permit the use of a custom selection prompt ;; ;; Arguments: ;; msg - selection prompt ;; params - list of ssget arguments (defun LM:ssget ( msg params / sel ) (princ msg) (setvar 'nomutt 1) (setq sel (vl-catch-all-apply 'ssget params)) (setvar 'nomutt 0) (if (and sel (not (vl-catch-all-error-p sel))) sel ) ) ;;---------------------=={ Select if }==----------------------;; ;; ;; ;; Provides continuous selection prompts until either a ;; ;; predicate function is validated or a keyword is supplied. ;; ;;------------------------------------------------------------;; ;; Author: Lee Mac, Copyright © 2011 - www.lee-mac.com ;; ;;------------------------------------------------------------;; ;; Arguments: ;; ;; msg - prompt string ;; ;; pred - optional predicate function [selection list arg] ;; ;; func - selection function to invoke ;; ;; keyw - optional initget argument list ;; ;;------------------------------------------------------------;; ;; Returns: Entity selection list, keyword, or nil ;; ;;------------------------------------------------------------;; (defun LM:SelectIf ( msg pred func keyw / sel ) (setq pred (eval pred)) (while (progn (setvar 'ERRNO 0) (if keyw (apply 'initget keyw)) (setq sel (func msg)) (cond ( (= 7 (getvar 'ERRNO)) (princ "\nMissed, Try again.") ) ( (eq 'STR (type sel)) nil ) ( (vl-consp sel) (if (and pred (not (pred sel))) (princ "\nInvalid Object Selected.") ) ) ) ) ) sel ) ;;-------------------=={ UnFormat String }==------------------;; ;; ;; ;; Returns a string with all MTEXT formatting codes removed. ;; ;;------------------------------------------------------------;; ;; Author: Lee Mac, Copyright © 2011 - www.lee-mac.com ;; ;;------------------------------------------------------------;; ;; Arguments: ;; ;; str - String to Process ;; ;; mtx - MTEXT Flag (T if string is for use in MTEXT) ;; ;;------------------------------------------------------------;; ;; Returns: String with formatting codes removed ;; ;;------------------------------------------------------------;; (defun LM:UnFormat ( str mtx / _replace rx ) (defun _replace ( new old str ) (vlax-put-property rx 'pattern old) (vlax-invoke rx 'replace str new) ) (if (setq rx (vlax-get-or-create-object "VBScript.RegExp")) (progn (setq str (vl-catch-all-apply (function (lambda ( ) (vlax-put-property rx 'global actrue) (vlax-put-property rx 'multiline actrue) (vlax-put-property rx 'ignorecase acfalse) (foreach pair '( ("\032" . "\\\\\\\\") (" " . "\\\\P|\\n|\\t") ("$1" . "\\\\(\\\\[ACcFfHLlOopQTW])|\\\\[ACcFfHLlOopQTW][^\\\\;]*;|\\\\[ACcFfHLlOopQTW]") ("$1$2/$3" . "([^\\\\])\\\\S([^;]*)[/#\\^]([^;]*);") ("$1$2" . "\\\\(\\\\S)|[\\\\](})|}") ("$1" . "[\\\\]({)|{") ) (setq str (_replace (car pair) (cdr pair) str)) ) (if mtx (_replace "\\\\" "\032" (_replace "\\$1$2$3" "(\\\\[ACcFfHLlOoPpQSTW])|({)|(})" str)) (_replace "\\" "\032" str) ) ) ) ) ) (vlax-release-object rx) (if (null (vl-catch-all-error-p str)) str ) ) ) ) ;; https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/set-annotative-using-lisp-or-vlisp/m-p/3266716#M301077 ;; Check if entity is annotative and which accounts for objects that were once annotative but are no longer. ;; ename - ename to check (returns T if annotative) ;; Alan J. Thompson (defun AT:isAnnotative (ename / check) (and (setq check (cdr (assoc 360 (entget ename)))) (setq check (dictsearch check "AcDbContextDataManager")) (setq check (dictsearch (cdr (assoc -1 check)) "AcDb_AnnotationScales")) (assoc 350 check) ) ) ;; https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/set-annotative-using-lisp-or-vlisp/m-p/3266684#M301075 ;; By User pbejse ;; (IsAnno-p ;; (setq itm (vlax-ename->vla-object (Car (entsel)))) ;; ) (defun IsAnno-p (ent / exd ano) (vl-load-com) (and (eq (vla-get-HasExtensionDictionary ent) :vlax-true) (setq exd (vla-GetExtensionDictionary ent) exd (vla-item exd "AcDbContextDataManager") ano (vla-item exd "ACDB_ANNOTATIONSCALES") ) (not (zerop (vla-get-Count ano))) ) ) (load "TcaseSup.lsp") (vl-load-com) ;; End (princ (strcat "\n:: Leader_To_Multileader.lsp edited on " (menucmd "m=$(edtime,0,DD-MO-yyyy)") " by 3dwannab (stephensherry147@yahoo.co.uk) loaded ::" "\n:: Type \"Leader_To_Multileader\" OR \"LTM\" to run Program ::" ) ) (princ) MLEADER Test Drawing.dwg
  12. I've noticed in Autocad 2016 using the curve arrow command makes more of a jagged pointed curve in the arrow than previous years. I was wondering if there was a way to change it back. To the perfect curve that it used to make before this years version. I included a picture of the arrows, the top one is 2016 and the bottom one is 2014 Autocad. I haven't found anything and I am assuming there isn't a way to change it. It's not that big of a deal just an eye sore to what I'm used to seeing. Thanks for the help
  13. I have tried to figure out how to tag an object and can't seem to figure it out. I know there is the leader but that's different then tagging right? I need the tag to extend from the object and the info be in a rectangle around the text. Also am I correct that you can set up the tagging in a way where all the tags get placed on a schedule? I need to know how to do this by Friday! See example image of what I need to do below
  14. Hi Hope some of you can help solving a problem. When using QLEADER (le enter) in a drawing with custom UCS, the text are displaced away from the leader line. As you can see on attached screen dumps, it looks just fine, when in World UCS. When in a custom UCS, the text are displaced, and when I try to move the text, the leader follows (of course as normally intended). How can I make the text get to place itself normaly, when drawing in a custom UCS (2D) Please help :-)
  15. Hello. I'm attempting to create a custom mleader style for keynotes, using a user defined block. This works great when I start the leader on the left and pull to the right. However, when I do the opposite, the block does not flip and the leader landing is attached to the wrong side of the block. (See attached) Is there a way to get the block to flip? I have no experience with LISPing, so if that 's the only way to resolve the issue, I will find another way. Thanks in advance. mleaderblock.dwg
  16. Long time Autocad User with minimal knowledge of software, repedetive work with preset tools. Question, i created a leaders style and when opening a new drawing, it is not there, i assumed that if i created a new style it would be available in all drawings. What am i doing wrong and how can i modify a leader style to be used in all drawings, new and old. Thank you for your response and help.
  17. I am looking for a routine to automate what we already do. We have a routine that currently when we run the command it ask for "Select location on pipe" which then user selects a point where they want the leader to start. After selecting the initial point the user then selects the "landing" point- the point where the number on a specific layer will appear. It then asks the user to enter the number for point they are referencing. Once the user hits "1" then "enter". It automatically puts in that number on the layer specified in the code with a prefix(#) and a suffix (-). This gets the job done.. However, I am curious to see if there is a way we can automate the numbering some way so that maybe when the user starts the command it prompts [specify Starting Reference Point Number] so if the user wants to start with #44, he/she enters #44 then can begin putting in these points and it populate the numbers automatically instead of the user having to RERUN the command separately, having to specify the number then hit enter everytime. Basically identical to Lee Macs Incremental Numbering Suite but with the option to pull leaders. Just seeing if there is anything out there I can use? Thanks in advance.
  18. I have found the following at the swamp, however I would like to modify it to better suite my needs. All credits to Lyle Hardin for writing the awesome code. ;;; CADALYST 08/08 www.cadalyst.com/code ;;; Tip 2305: LeaderToMleader.lsp Leader to Multileader (c) 2008 Lyle Hardin ;;; Pick an old style leader and text to create a new mleader entity and erase the old leader and text. ;;; March/2008 (defun c:leadertomleader () (setq leader (entsel "\nPick Leader") ; pick leader leader2 (entget (car leader)) pt1 (dxf 10 leader2) ; get first point of leader layer (dxf 8 leader2) ; get layer of leader mtext (entsel "\nPick Text") ; pick text mtext2 (entget (car mtext)) pt2 (dxf 10 mtext2) ; get point of text text (dxf 1 mtext2) ; get ) ; setq (command "-layer" "s" layer "") ; set layer of leader picked to current (command "mleader" pt1 pt2 text) ; start mleader command (COMMAND "ERASE" mtext "") ; erase text picked (command "erase" leader "") ; erase leader picked ) ; defun (defun dxf(code elist) ; define dxf function (cdr (assoc code elist)) ;Finds the association pair, strips 1st element );defun So what I would like to do is instead of selecting the insertion point of the mtext as the second point, I would like to change it to the second point of the leader. I've done a little bit of digging around, but all I have found is that the dxf codes for the vertices are 10, resulting in a list: (10 -94274.8 121436.0 0.0) (10 -94274.8 121109.0 0.0) (10 -95313.2 121109.0 0.0) ...(and so on) Hence my question, how do I get the second vertex of the leader? Thanks in advance.
  19. I am setting up some architectural Multileader Styles to pull into various drawings as needed from the Designcenter. I have created 7 different scales of Multileaders and set their Text "Left and Right Attachments" to "Middle of top line". When I pull the styles into a drawing, the "Left Attachment" is true and is at the middle of the top line. However when I make a right attachment the multileader randomly decides to "Underline top line". I have thought of everything I can to try and fix it in the original file referenced from the designcenter...both attachments say "Middle of top line". I have overwrote the Styles in the file and saved things and closed down things and restarted things. lol I'm at a loss and so any help would be appreciated. Along the same lines - for these multileader styles I am creating, how can I get rid of default text? I would like to be able to just click the multileader tool, place it in my drawing, and begin typing - but somehow I cannot get rid of the "Contents" - or - "Default Text" because AutoCAD asks me if I want to overwrite the default text when I place it - in which I would always like to overwrite it so i'd rather have no default text and just be able to type asap. lol Thanks,
  20. Whenever I try to add another leader to my vertex, it usually jumps to the end of the line. Any way to make ALL leader arrows come out of the same vertex? Do I need to adjust my mleaderstyle settings? PS- I recorded a GIF with LICEcap but the File Upload Manager on Cadtutor uploads it as a JPG for some reason.
  21. I have created a new multileader with the settings that the multileader type is "block" so that the end of the leader will have a detail bubble on the end, my problem I am running into is the text size inside that bubble is too small, how do i adjust the text size with keeping the bubble the original size? I have the bubble the size I want it at by adjusting the scale to 10", anybody have an idea what to do?
  22. Hello, This is outside my normal LISPing and I am in need so some advice. My goal is to create (or modify) a multileader leader and landing line so they can be used to add perpendicular leaders to opposing sides of drawing features, as seen in the attached image. The reason for this is to improve the clarity of labeling (by having an additional leader style. I am not sure if this can be completed via LISP or a .net approach must be taken. Can anyone provide any advice? Thanks David
  23. Hello, I am trying to add a bend to my leader lines using Civil 2013. I have attached two images the first one is of my standard leader (dimension is inline with the leader line), the second one is a leader I "faked" to illustrate my desired leader style, a perpendicular leader then a bend to some text. Does anyone know how a leader like this can be made. In this example I am using a dimension, but I would be happy with a solution that used multileader. Thanks If any clarification is required please ask
  24. I'm wondering how to change the thickness of leader lines. I'm editing a drawing done by someone else and I need to make the leader lines thicker. I tried changing the layer thickness and making sure the settings were such that the leader line thickness would be determined by the layer. I also tried channging the leader line thickness in properties and/or leader styles, but no luck there either. Anyone know what might be going on?
  25. I am running AutoCAD MEP 2012. Does anyone have a basic routine for a conduit leader?
  • Create New...