Leaderboard
Popular Content
Showing content with the highest reputation on 11/15/2021 in all areas
-
628 downloads
Apollonius problem : (PPP, LPP, LLP, LLL, CPP, CLP, CLL, CCP, CCL, CCC) P - point L - line C - circle Routine finds all CIRCLES that touches or passes (point) as tangent curves to combination of (C - circle; L - line; P - point) Relevant page on Wikipedia : https://en.wikipedia.org/wiki/Problem_of_Apollonius And my video demonstrating my routine : https://youtu.be/cuo4M9UGZmA Number of circles demonstrated in video corresponds to Wikipedia table at the end of page... Regards, Marko Ribar, d.i.a. (architect)1 point -
Version 1.7.0
3,321 downloads
This program will calculate the total length of Lines/Polylines/LWPolylines/Arcs/Ellipses/Circles/Splines with an optional filter. The Filter may be used to select only those lines that are on a certain layer, or perhaps have a certain linetype or colour. The results of the calculation can be displayed in an ACAD Table within the drawing, or written to either a CSV or TXT File. The Table-Style may be selected from the drop-down in the main dialog. Main interface The main dialogue box allows the user to filter lines by layer, linetype or colour and select the table style. Multiple selected items can filtered. A filter string may be entered to help the user quickly find the filter items that he/she requires. Options The options dialogue box allows the user to specify which object types should be included and the type of output, table in the drawing, CSV file or TXT file. Demo Function Syntax: LenCal For instructions on how to run the program see here. Any comments, criticism and suggestions are welcome. Either PM me directly, or reply to the original thread.1 point -
Version 1.0.0
1,030 downloads
Multiple Toggles is a library routine that allows you to create as many Toggles of input as required (subject to Autocad limits) using a dialouge rather than the command line. Its use is intended where you want the user to pick one or more values. It can be used where you want to run a number of functions, pick multiple values to be used. It can be used in most lisp code with just a couple of lines of code, compared to a hard coded solution of around 50+ lines repeated every time you want to use a dcl. To use just save the "Multiple Toggles.lsp" to a directory that is included in you Autocad search path. If you need more information how to do this send an email to info@alanh.com.au It only requires 2 lines of code in any lisp to use. (if (not AH:Toggs)(load "Multiple toggles.lsp")) (setq ans (AH:toggs (list "Change blank for yes " "Blocks" "Dimension" "Hatch" "Images" "Viewports" ))) In the example above the variable ans will have the toggle Values 1 or 0 for a toggle clicked on eg ("1" "0" "1" "0" "1") depending on toggle selected. If you want further information or conversion of your code email info@alanh.com.au1 point -
hello i managed to make it work, thank you all from my heart! (LOAD "C:/Users/Utente/Dropbox/Lavoro/backup/AUTOCAD/Lisp/PURGE/RSHX.lsp");RSHX; many thanks1 point
-
1 point
-
Yes @Steven P probably didn't explain it properly. 1. ^C^C^(load (strcat (getenv "userprofile") "\\Dropbox\\Lavoro\\backup\\AUTOCAD\\Lisp\\PURGE shape purge.lsp")) only loads the lisp. 2. Loading a lisp by default doesn't produce a message by default 3. if you already have the lisp loaded you only need to run the lisp then and should either be typed in the command prompt or ^C^C _lispcommand if you want just upload your lisp file and Steven or I will fix it.1 point
-
I think mhupp might have confused you, but that's OK. Your original command ^C^C^(load (strcat (getenv "userprofile") "\\Dropbox\\Lavoro\\backup\\AUTOCAD\\Lisp\\PURGE shape purge.lsp")) loads into memory all the LISP routines saved within the file "PURGE shape purge.lsp". There might be one, there might be a few. Next step would be to open your file 'PURGE shape purge.lsp' and look through it (or do a 'find') for the start of each function, which will typically start with "(defun c:" until you find the function you want to run. Replace mhupps example (C:RSHX with the name of your function and not his example and try that. Th part after the 'c' is the name of the LISP function and you will need to use (c: +[LISP name] )1 point
-
1 point
-
It gives them the fonts so that they *can* install them and use them? dJE1 point
-
I wouldn't ordinarily allow the promotion of products and services, but allowing this as it may be genuinely useful for some menbers. I recommend you mute your speaker while you watch this video - the terrible background music is incredibly distracting!1 point
-
I have this My Match Properties, its not reversing the properties but still might be helpful. More than 4 years old (I feel like I wrote it yesterday) time flies.... ; My Match Properties - Grrr (defun C:MyMatchProps ( / tgassoc tgswitch *error* dcl des dch dcf tmp L SS tmpL i o ) ; Toggle associator - connect toggle value (0 or 1) with symbol value (nil or T): (defun tgassoc ( keyorval ) (cadr (assoc keyorval '((nil "0")(T "1")("0" nil)("1" T)))) ) ; Grrr ; Toggle switcher - switch toggle's value (defun tgswitch ( key ) (set_tile key (cadr (assoc (get_tile key) '(("0" "1") ("1" "0")))))) ; Grrr (defun *error* ( msg ) (and (< 0 dch) (unload_dialog dch)) (and (eq 'FILE (type des)) (close des)) (and (eq 'STR (type dcl)) (findfile dcl) (vl-file-delete dcl)) (and msg (or (wcmatch (strcase msg) "*BREAK,*CANCEL*,*EXIT*") (princ (strcat "\nError: " msg)) )) (princ) ); defun *error* (cond ( (progn (and (setq SS (cadr (ssgetfirst))) (sssetfirst nil nil)) nil) ) ; I'm using implied SS, because I often work with SS filters ( (progn (while (not (member dcf '(0 1))) (*error* nil) (cond ( (not ; Rewrite and Reload the dialog continiously (and (setq dcl (vl-filename-mktemp nil nil ".dcl")) (setq des (open dcl "w")) (vl-every (function (lambda (x) (princ (strcat "\n" x) des))) (list "MyMatchProps : dialog" "{ label = \"Match Properties\";" " spacer; : column " " { : row " " { : text { label = \"Source object\"; }" " : button { key = \"sb\"; label = \">>\"; fixed_width = true; width = 2; }" " }" " : row " " { : text { label = \"Destination objects\"; }" " : button { key = \"db\"; label = \">>\"; fixed_width = true; width = 2; }" " }" " }" " : spacer { height = 1; }" (if L (strcat " : column" " { children_fixed_width = true; children_alignment = left;" " : text { label = \"Properties To Match\"; } spacer;" (apply 'strcat (mapcar (function (lambda (x) (strcat ": toggle { label = \"" (car x) "\"; key = \"" (car x) "\"; value = 1; }"))) L)) " spacer;" " : button { label = \"Switch Toggles\"; key = \"Switch\"; mnemonic = \"t\"; }" " spacer;" " }" ); strcat " : text { label = \"Source object not specified!\"; alignment = centered; }" ); if L " : spacer { height = 1; }" " ok_cancel; : text { key = \"error\"; }" "}" ); list ); vl-every (not (setq des (close des))) (< 0 (setq dch (load_dialog dcl))) ); and ); not (princ "\nUnable to write or load the DCL file.") (setq dcf 0) ) ( (not (new_dialog "MyMatchProps" dch)) (princ "\nUnable to display the dialog") (setq dcf 0) ) (T (if tmpL (mapcar (function (lambda (x) (set_tile (car x) (cdr x)))) tmpL)) ; remember (restore) chosen toggles between sessions. (vl-every (function (lambda (x) (action_tile (car x) (strcat "(done_dialog " (itoa (cadr x)) ")")))) '(("sb" 2) ("db" 3))) ; button actions (action_tile "Switch" (vl-prin1-to-string '(progn (mapcar (function (lambda (x) (tgswitch x))) (mapcar 'car L)) (setq tmpL (mapcar (function (lambda (x) (cons x (get_tile x)))) (mapcar 'car L))) ); progn ); vl-prin1-to-string ); action_tile (if L (vl-every ; toggle actions (function (lambda (x) (action_tile (car x) (vl-prin1-to-string '(cond ( (assoc $key tmpL) (setq tmpL (subst (cons $key $value) (assoc $key tmpL) tmpL)) ) ( (setq tmpL (cons (cons $key $value) tmpL)) ) ); cond ); vl-prin1-to-string ); action_tile ); lambda ); function L ); vl-every ); if L (action_tile "accept" (vl-prin1-to-string '(cond ( (not L) (set_tile "error" "Check the above message - Grrr.") ) ( (not SS) (set_tile "error" "Destination objects not specified!") ) ( (setq L (mapcar (function (lambda (x) (append x (list (get_tile (car x)))))) L)) ; end result of L (done_dialog 1) ) ); cond ); vl-prin1-to-string ); action_tile (setq dcf (start_dialog)) ); T ); cond (cond ( (= 2 dcf) (and (setq tmp ( (lambda (x / p) (setvar 'errno 0) (while (/= 52 (getvar 'errno)) (setq p (car (entsel "\nSelect Source Object <exit>: "))) (cond ( (= 7 (getvar 'errno)) (princ "\nMissed, try again!") (setvar 'errno 0) ) (p (setq p (vlax-ename->vla-object p)) (setvar 'errno 52) ) ); cond ); while p ); lambda nil ) ); setq tmp (setq L ; I care about only this list here (apply 'append (mapcar (function (lambda (x) (if (vlax-property-available-p tmp x) (list (list x (vlax-get tmp x)))))) '("Color" "Layer" "LineType" "LinetypeScale" "Lineweight" "EntityTransparency" "Material" "Rotation" "TextString" "StyleName" "Width" "Height" "AttachmentPoint" "BackgroundFill" "LineSpacingDistance" "LineSpacingFactor" "LineSpacingStyle" "XEffectiveScaleFactor" "XScaleFactor" "YEffectiveScaleFactor" "YScaleFactor" "ZEffectiveScaleFactor" "ZScaleFactor" ); list ); mapcar ); apply 'append ); setq L ); and ); (= 2 dcf) ( (= 3 dcf) (and (princ "\nSelect Destination Objects: ") (setq tmp (ssget "_:L")) (setq SS tmp) ) ); (= 3 dcf) ); cond ); while (/= 1 dcf) ); progn (princ "\nUser cancelled the dialog.") ) ( (and L SS) (setq L (vl-remove-if (function (lambda (x) (not (tgassoc (caddr x))))) L)) (repeat (setq i (sslength SS)) (and (setq o (vlax-ename->vla-object (ssname SS (setq i (1- i))))) (vlax-write-enabled-p o) (mapcar (function (lambda (x) (and (vlax-property-available-p o (car x)) (vl-catch-all-apply 'vlax-put (list o (car x) (cadr x)))) ); lambda ); function L ); mapcar ); and ); repeat ; (alert (apply 'strcat (mapcar '(lambda (x) (strcat "\n" (vl-prin1-to-string x))) L))) ; check ; (alert (apply 'strcat (mapcar '(lambda (x) (strcat "\n" (vl-prin1-to-string x))) tmpL))) ; check ); T ); cond (*error* nil) (princ) ); defun1 point
-
I am sorry that wouldn't work for you. Please help US to help YOU, by changing your profile SOFTWARE to AutoCad LT 2022. I am not sure if LAYMERGE command is available in LT, as I have never used it, you might want to check it out, as another approach.1 point
-
1 point