All Activity
- Today
-
It's excellent, thank you I just think there is a mistake When the first number has more than one repetition, it is not counted. Could it be possible to export a file xls with two columns of values, its tag and its quantity?
-
How to deploy list of Lisps to everyone in the organisation - AutoCAD LT
BlackBox replied to CivilTechSource's topic in AutoLISP, Visual LISP & DCL
Since you're not using the return for vl-directory-files (just checking if it exists), findfile will be much faster: (defun _vl-directory-files (path /) (vl-directory-files path "*.*") ) (defun _findfile (path /) (findfile path) ) Quick benchmark: _VL-DIRECTORY-FILES Elapsed: 1391 Average: 0.1391 _FINDFILE Elapsed: 484 Average: 0.0484 In any event, here's a slightly simplified mod: (defun c:SetTrustedPaths (/ ) (foreach path (list "C:\\Users\\A Folder\\LISPs\\..." ) (_SetTrustedPaths path) ) (princ) ) (defun _SetTrustedPaths (path / trustedpaths) ;; folder check (if (not (findfile path)) (vl-mkdir path)) ;; trusted path check (if (vl-string-search (strcase path) (strcase (setq trustedpaths (getvar 'trustedpaths))) ) trustedpaths (setvar 'trustedpaths (strcat (if (= 59 (last (vl-string->list trustedpaths))) trustedpaths (strcat trustedpaths ";") ) path ) ) ) ) Cheers -
How to deploy list of Lisps to everyone in the organisation - AutoCAD LT
Steven P replied to CivilTechSource's topic in AutoLISP, Visual LISP & DCL
My mind was working on this last night... This should add a folder location to the users trusted locations - a few little checks along the way - then LISPs should just run (defun c:trustedpaths ( / MyDir) (setq MyDir "C:\\Users\\A Folder\\LISPs") ;; path to add ;; Can do MyDir as a list and a foreach to call (trustedpaths) (trustedpaths MyDir) ) (defun trustedpaths (MyDir / MyTrustedPaths) (setq MyTrustedPaths (getvar 'trustedpaths)) ;;get current trusted paths (if (vl-directory-files MyDir "*.*") ;;Does MyDir location exist. If not create it (princ (strcat MyDir " Folder exists.\n")) ;;Yes (progn (princ (vl-mkdir MyDir)) ;;No: Create folder (princ " Folder created.\n") ) ) (if (vl-string-search (strcase MyDir) (strcase MyTrustedPaths)) ;;Is MyDir in TrustedPaths (progn (princ (strcat MyDir " is a trusted Path.\n")) ;;Yes ) (progn ;; No: add to trusted paths (if (equal (substr MyTrustedPaths (- (strlen MyTrustedPaths) 0) ) ";") ;; Edit for trailing ; (setq MyTrustedPaths (strcat MyTrustedPaths " " MyDir)) (setq MyTrustedPaths (strcat MyTrustedPaths "; " MyDir)) ;; include ; ) (setvar 'trustedpaths MyTrustedPaths) ;; update trustedpaths system variable ) ) (princ (strcat "Trusted paths: " (getvar 'trustedpaths))) (princ) ) -
Try ;BACALADODEBILBADO.noes (defun nqf (tuSS / i lista tipObj cad) (princ "\nNumero que falta") (terpri) (setq cant (sslength tuSS)) (princ "\nCantidad de textos seleccionados = ") (princ cant) (princ "\nLista de numeros faltantes") ;Pasar del SS a una lista de valores (setq i 0) (repeat (sslength tuSS) (setq tipObj (cdr (assoc 0 (setq le (entget (ssname tuSS i))))) num (atoi (cdr (assoc (if (= tipObj "TEXT") 1 2) le))) i (1+ i) lista (if (setq l (assoc num lista)) (subst (list num (1+ (cadr l))) l lista) (append lista (list (list num 1))) ) ) ) ;Imprimir los valores que no aparezcan (terpri) (setq i 1) (princ (strcat "\nLista de numeros existentes\n" (while lista (if (setq v (assoc i lista)) (setq cad (if (= (cadr v) 1) (if cad (strcat cad ", " (itoa (car v))) (itoa (car v)) ) (if cad (strcat cad ", " (itoa (car v)) "(" (itoa (cadr v)) ")") (itoa (car v)) ) ) lista (vl-remove v lista) ) (princ (strcat "\nFalta el # " (itoa i))) ) (setq i (1+ i)) cad ) ) ) (princ) ) (defun c:nqf nil (nqf (ssget '((0 . "TEXT,ATTDEF")))))
-
bustr started following Ladder orientation
-
Autodesk seems to go out of their way to match the difficulty of intools, lotus notes and IFP-PRO. Can anyone tell me why my ladder is horizontal (There was no option in the dialog box for orientation.), why it has more rungs than specified, why there are no busses and why there is an "X" at the end. Autodesk's forums are useless so I don't expect to get an answer from them.
-
thanks for the contribution master There is a routine that I use for texts and it helps me know what number is missing in a series of numbers. A similar one would help me a lot but for "ATTDEF" because I receive drawings in which other people number pieces, sometimes with texts and sometimes with "ATTDEF" So I need to do an audit to know the amount of "ATTDEF", which number is missing and how many times each tag is repeated. here code master... (defun nqf (tuSS / i lista) (princ "\nNumero que falta") (terpri) (setq cant (sslength tuSS)) (princ "\nCantidad de textos seleccionados = ") (princ cant) (princ "\nLista de numeros faltantes") ;Pasar del SS a una lista de valores (setq i 0) (repeat (sslength tuSS) (setq lista (cons (atoi (cdr (assoc 1 (entget (ssname tuSS i))))) lista) i (1+ i)) ) ;Imprimir los valores que no aparezcan (setq lista (vl-sort lista '< ) i 1 ) (repeat (last lista) (if (null (member i lista))(princ (strcat "\nFalta el # " (itoa i)))) (setq i (1+ i)) ) (princ "\nLista de numeros existentes") (terpri) (princ lista) (terpri) (textscr) ) (defun c:nqf nil (nqf (ssget '((0 . "TEXT"))))) thanks
-
BLOCK ISSUES - The selected block has no editable attributes
Steven P replied to ColinPearson's topic in AutoCAD 2D Drafting, Object Properties & Interface
Like SLW, I have my preferred settings in a LISP - runs at startup - but if I am playing about with things I can reset then to what I like. -
BLOCK ISSUES - The selected block has no editable attributes
SLW210 replied to ColinPearson's topic in AutoCAD 2D Drafting, Object Properties & Interface
I use the acaddoc.lsp to set my Sysvars. ;(SETVAR "" n) (SETVAR "FILEDIA" 1) (SETVAR "FILLMODE" 1) (SETVAR "FRAME" 2) System variables are not saved in AutoCAD I just went through the SYSVDLG, then made the settings as I had them. Not sure how up to date this list is... List of System Variables - AutoCAD Tutorial and Videos -
ColinPearson started following Handy thing for using architectural units
-
Handy thing for using architectural units
ColinPearson posted a topic in AutoCAD 2D Drafting, Object Properties & Interface
I finally convinced my IT to put this key remapper software on my machine after not having it at my new job for a couple years. It's nice to have back. I always thought it was annoying to move from the 10-key pad to the main keyboard just to type the single quote ( ' ) for the feet part of arch units. Remap the NumLock key to the Single Quote, and problem solved. I'm sure there are many others out there but this one has worked well for me for years. https://keytweak.net/en/ Hope that helps someone.-
- 1
-
-
BLOCK ISSUES - The selected block has no editable attributes
ColinPearson replied to ColinPearson's topic in AutoCAD 2D Drafting, Object Properties & Interface
@SLW210 I did that yesterday and have things mostly back, except for system variables. I did SYSVAR and copied all of them for 2023 and 2025 to lists that I'll go through today or tomorrow and update the ones I want to in 2025 to match what I had. Is there a better way? Seems odd that migrating settings doesn't migrate System Variables. -
BLOCK ISSUES - The selected block has no editable attributes
SLW210 replied to ColinPearson's topic in AutoCAD 2D Drafting, Object Properties & Interface
I also saw this issue with Mechanical 2025 mentioned on the Autodesk Forums, perhaps keep a copy of your customizations to quickly import if you need to reset. How to export, import, backup, and transfer settings to and from AutoCAD products I use AutoCAD and if needed I use one of the other toolsets separately, seldom do I switch to the Vanilla AutoCAD profile while in a toolset. I have no reason why, just always have done it that way. -
Tapered Offset/Stretch closed polyline shape
SLW210 replied to SLW210's topic in AutoLISP, Visual LISP & DCL
Here was my post with my examples... I was working towards modifying Lee Macs OffsetSection LISP (mostly trying some of those functions), but getting a proper response from the adjacent sections is tedious. Here is a single offset modifications of it... For my needs as stated earlier, I might need to work on just a redraw from the inputs for the radii, etc. Your LISP looks pretty good for moving roads, certainly useful. AFAIK, I don't have any upcoming road projects, though I might need to fine tune a few, they never put them exactly where I draw them. -
Tapered Offset/Stretch closed polyline shape
dexus replied to SLW210's topic in AutoLISP, Visual LISP & DCL
For me it works as expected, I mostly use it on arcs that are symmetrical though. Those results seem more logical: But the vertexes stay in line and the lines stay tangent to each other. I guess increasing the arc size of the arc instead might be another option. What would be the expected result for you? I'm not sure if you can keep the constraints without changing the position of that gray line in its direction. -
Tapered Offset/Stretch closed polyline shape
SLW210 replied to SLW210's topic in AutoLISP, Visual LISP & DCL
For an accurate snap the drag point needs to be on the polyline, so not an accurate snap. At a certain point it stops following the surrounding shapes, works well on the straight with taper in my drawing. On the Taper at the top keyboard input seems okay, the arc sections not so accurate. It is an interesting LISP though. -
tantbd44 started following BIGAL
-
I have something that would have done what you want, but it looks for blocks with attributes, I personally only ever make blocks with say a single attribute. Complicating it even more the display is the tag names. It's not a very nice dwg. lastly the answer is in lst3 but you have not said what you want done with it. ; count attdefs via tagname ; BY AlanH July 2025 (defun c:wow ( / lst lst2 att cnt lst3) (defun my-count (a L) (cond ((null L) 0) ((equal a (car L)) (+ 1 (my-count a (cdr L)))) (t (my-count a (cdr L)))) ) ; By Gile (defun remove_doubles (lst) (if lst (cons (car lst) (remove_doubles (vl-remove (car lst) lst))) ) ) (setq ss (ssget '((0 . "ATTDEF")))) (setq lst '()) (repeat (setq x (sslength ss)) (setq att (vlax-ename->vla-object (ssname ss (setq x (1- x))))) (setq lst (cons (vlax-get att 'tagstring) lst)) ) (setq lst (acad_strlsort lst)) (setq lst2 (remove_doubles lst)) (foreach val lst2 (setq cnt (my-count val lst)) (setq lst3 (cons (list val cnt) lst3)) ) (princ) )
- Yesterday
-
leonucadomi started following ATTDEF COUNT...help
-
hello: I would like to know if there is any LSP routine that helps me define the definition of attributes like similar to Tcount from master LEE MAC . Here I attach an example dwg of the entities that I need to quantify thanks example.dwg
-
How to deploy list of Lisps to everyone in the organisation - AutoCAD LT
ronjonp replied to CivilTechSource's topic in AutoLISP, Visual LISP & DCL
Very similar setup here -
How to deploy list of Lisps to everyone in the organisation - AutoCAD LT
BlackBox replied to CivilTechSource's topic in AutoLISP, Visual LISP & DCL
Our company issues laptops to everyone, so this also helps with users who are working over VPN, as they don't need to round-trip setup/customization data to the network just to launch CAD. When I was recently hired on, I convinced them that I should have a headless workstation (no monitors, keyboard, mouse) right there in the office, co-located with the server... Instead of mapping the server shares to my laptop at home (I work 100% remote), I use VPN to tunnel into my office workstation via RDP, so I'm only streaming pixels and clicks, but have all of the performance of the physical workstation +/- 3 FT from the server. -
Tapered Offset/Stretch closed polyline shape
GLAVCVS replied to SLW210's topic in AutoLISP, Visual LISP & DCL
Excuse me I need to insist on the question. @dexus: You said you're used to doing this kind of task. Therefore, I assume you can answer this question: does running the code on the polyline shown in the clip work as it should? arcsAndMoreArcs.mp4 -
ronjonp started following How to deploy list of Lisps to everyone in the organisation - AutoCAD LT
-
How to deploy list of Lisps to everyone in the organisation - AutoCAD LT
ronjonp replied to CivilTechSource's topic in AutoLISP, Visual LISP & DCL
You described my exact process! Great minds and all : ) -
Yes, that's OK, though it looks like the 2 threads are crossing each other a little.... might be that one follows the link you posted to see the other half of the story.
-
LISP to Remove Unreferenced PDFUNDERLAYs
OriginalRob2 replied to OriginalRob2's topic in AutoLISP, Visual LISP & DCL
thanks, good advice -
BLOCK ISSUES - The selected block has no editable attributes
ColinPearson replied to ColinPearson's topic in AutoCAD 2D Drafting, Object Properties & Interface
10-4, I thought that thread was on the AUGI forums, I was planning to go look there later this morning. Since then, I have found that IT put 2025 on my machine, and even though all the setting are completely cattywompus, both the regular DDEDIT works when I double click dimensions, and BEDIT runs when I double click a block. I make just start in changing all my setting on 2025 and go forward with my life. Thank you for your help everyone, I appreciate y'all taking some time to help. This place is a great resource. -
BlackBox started following How to deploy list of Lisps to everyone in the organisation - AutoCAD LT
-
How to deploy list of Lisps to everyone in the organisation - AutoCAD LT
BlackBox replied to CivilTechSource's topic in AutoLISP, Visual LISP & DCL
I prefer to use NETLOGON (the BAT, etc script configured in Active Directory that runs when a Domain user logs in) to copy from network to workstations, so when user starts CAD everything is already there. That way, when we update something in our setup, and that gets pushed to network, a notification goes out to everyone and it's up to users to restart or log out/in as they need, based on their project deadlines. This gives us the speed of having everything local to the workstation, no (additional) user action required to sync, and we still have everything backed up on the network. HTH -
BLOCK ISSUES - The selected block has no editable attributes
SLW210 replied to ColinPearson's topic in AutoCAD 2D Drafting, Object Properties & Interface
Power Dimensioning - AutoCAD 2D Drafting, Object Properties & Interface - AutoCAD Forums