Steuwe Posted June 16, 2020 Posted June 16, 2020 (edited) Edit: Using MicroSurvey 2016. I have a LISP routine utilizing the "leader" command that has prompts for custom text options. My LISP skills are pretty new so I pieced it together using other routines and research. (I'm trying to find where I found the main one.) Problem is that our drawings have different settings for custom text style heights; and the command appears to be changing the leader arrow size along with the text. The arrow gets bigger and bigger with each base drawing scale that uses larger and larger text. This is overriding the dimension settings I have for the leader arrow size. I believe the issue is in the part that calls out the text and how it's written, but my skills are not good enough to figure out why. I'll paste the LISP routine below and upload a file: (defun c:fe () (initget "Contiguous Our") (setq etype (getkword "\nEncroachment type [Contiguous/Our] <Contiguous>: ")) (if etype (setq etype (strcase etype)) (setq etype "CONTIGUOUS") ) (initget "Wood Cl Metal Vinyl Wire") (setq material (getkword "\nMaterial [Wood/Cl/Metal/Vinyl/WIre] <Wood>: ")) (if material (setq material (strcase material)) (setq material "WOOD") ) (if (= material "CL") (setq material "C.L.") ) (if (= material "Metal") (setq material "Metal") ) (if (= material "Vinyl") (setq material "Vinyl") ) (if (= material "Wire") (setq material "Wire") ) (initget 1) (setq dist (getdist "\nDistance: ")) (setq textstyle (getvar "textstyle")) (setvar "textstyle" "ata6") (setq dimzin (getvar "dimzin")) (setvar "dimzin" 0) (setq clayer (getvar "clayer")) (setvar "clayer" "encroachment") (setq text (strcat etype " " material " FENCE\\PENCROACHES " (rtos dist 2 1) "\'")) (setq dimtad (getvar "dimtad")) (setvar "dimtad" 0) (setq dimasz (getvar "dimasz")) (setvar "dimasz" (/ (ctxtstyleht) 30)) (command "leader" pause pause "" text "") (setvar "dimtad" dimtad) (setvar "dimasz" dimasz) (setq enttext (entlast)) (entmod (subst (cons 7 "ata6")(assoc 7 (entget enttext)) (entget enttext))) (entmod (subst (cons 40 (ctxtstyleht))(assoc 40 (entget enttext)) (entget enttext))) ;;; (command "chprop" (entlast) "" "_la" "encroachment" "") (setvar "dimzin" dimzin) (setvar "textstyle" textstyle) (setvar "clayer" clayer) ) I believe the issue is somewhere in this portion. Something must be telling it to insert at the size of the text height which effects the arrow size. (command "leader" pause pause "" text "") (setvar "dimtad" dimtad) (setvar "dimasz" dimasz) (setq enttext (entlast)) (entmod (subst (cons 7 "ata6")(assoc 7 (entget enttext)) (entget enttext))) (entmod (subst (cons 40 (ctxtstyleht))(assoc 40 (entget enttext)) (entget enttext))) I have a few commands that are very similar but with different prompts. If I can find out what causes it in this one, I can fix them all. Any help will be greatly appreciated. I've attached the LSP file as well. fe.lsp Edited June 16, 2020 by Steuwe Quote
tombu Posted June 16, 2020 Posted June 16, 2020 You need the qlset.lsp to change or account for leader settings in your lisp. The CADTutor search below should help. https://www.cadtutor.net/forum/search/?q=qlset Search on AUTODESK KNOWLEDGE NETWORK below. https://forums.autodesk.com/t5/forums/searchpage/tab/message?advanced=false&allow_punctuation=false&filter=location&location=category:8&q=qlset.lsp Quote
SLW210 Posted June 17, 2020 Posted June 17, 2020 I have moved your post to the AutoLISP, Visual LISP & DCL Forum. 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.