Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/28/2023 in all areas

  1. Version 1.0.0

    7,022 downloads

    Here are 6 variants of TSP*.lsp... First one : TSP.lsp - wrapper for grid and rnd disposition - LISP and ObjectARX... Second one : TSP-ALL.lsp - gathered plenty of subfunctions to pull out best results by permutations of point clouds... Third one : TSP-cheapestpath.lsp - Similar to TSP.lsp (wrapper) but without choosing for grid and rnd dispositions... Fourth one : TSP-MMR.lsp - FAST grid and rnd disposition with Evgeniy Elpanov's optimization with 2 factor permutation... Fifth one : TSP-MMR+ALL.lsp - combination of TSP-MMR.lsp and TSP-ALL.lsp... Sixth one : TSP-MR-AROUND-CONCAVE.lsp - very nice little routine to make stars from radially disposition of points... Big thanks to Daniel from www.theswamp.org for providing *.arx and *.brx files for AutoCAD 2025 and BricsCAD V25... More info and newly added *.arx, *.brx, ... at this link : https://www.theswamp.org/index.php?topic=58049.0 HTH. M.R.
    1 point
  2. Version 1.3

    2,279 downloads

    Are you someone who likes to get details in your drawings done neatly? Then look no further! Here I present you a program that does just that. This program aligns selected objects to any direction the user wants to align them to. This provides that the objects possess at least one of the following properties: Insertion Point Text Position Text Alignment Position Center Upon issuing the command ATD, the user will be prompted a selection of objects without any filters, which the program will then filter based on the above (and xrefs excluded). The objects to be aligned will then be highlighted, and the user will be prompted a direction relative to the UCS. This can be in one of five ways: Clicking two points to determine direction Typing "X" - to align direction to X axis of UCS. Typing "Y" - to align direction to Y axis of UCS. Typing "PErpendicularToCurve" - the user specifies a point on any curve, and if a curve is detected, aligns perpendicular to the curve at that point. Typing "ALongCurve" - the user specifies a point on any curve, and if a curve is detected, aligns at the direction of the curve at that point Curve detection is compatible within all sorts of complex objects, such as nested blocks (with dynamic properties), xrefs, tables, dimensions, etc. regardless of depth, and fully functional under all UCS. Following this, the user can then specify an optional distance that would be used to align the objects, or choose the "Through" option. This makes up an exactly identical feature to the built-in AutoCAD OFFSET command. If a distance is specified, the user will also be specified a point that will be used to calculate the specified distance away from the point. If "Through" is chosen, the user will then be prompted the point to place the objects. If the distance has been chosen and specified, the user can click on the side that the user wishes to place the objects at that distance from the point. Objects that I've successfully worked with this program include: Tables Blocks OLE/Raster images Dimensions Texts and MTexts (regardless of alignment) Circles This program will work under any UCS settings provided that the objects to be translated lies in the same XY plane as the UCS.
    1 point
  3. Here you go, the idea behind coding the program this way seems insane and different. (defun c:exppl (/ ss fl op nr e a l) ;;----------------------------------------------------;; ;; Author : Tharwat Al Choufi ;; ;; website: https://autolispprograms.wordpress.com ;; ;;----------------------------------------------------;; (initget 6) (or (setq nr (getint "\nNumber of first point <1> : ")) (setq nr 1) ) (princ "\nSelect polylines :") (and (setq ss (ssget ":S" '((0 . "LWPOLYLINE,POLYLINE")))) (setq fl (substr (getvar "dwgname") 1 (- (strlen (getvar "dwgname")) 4) ) ) (setq op (open (strcat (getvar "dwgprefix") fl "_exppl.txt") "w")) (progn ((lambda (i / g m p d) (while (setq e (ssname ss (setq i (1+ i)))) (setq g (entget e) a (assoc 10 g) m (cdr (cddddr (member a g))) g (append g (list a)) a (cdr a) l nil ) (or l (setq l a)) (mapcar '(lambda (x) (and (= (car x) 10) (setq p (cdr x)) (write-line (strcat (itoa nr) "," (rtos (cadr a) 2 3) "," (rtos (car a) 2 3) "," (rtos (distance a p) 2 3)) op ) (setq nr (1+ nr) a p ) ) ) m ) (write-line (strcat (itoa nr) "," (rtos (cadr a) 2 3) "," (rtos (car a) 2 3) "," (rtos (distance a l) 2 3)) op ) (setq nr (1+ nr)) (foreach itm (list (list "Perimeter = " (vlax-curve-getdistatparam e (vlax-curve-getendparam e) ) ) (list "Area = " (vlax-curve-getarea e)) ) (write-line (strcat (car itm) (rtos (cadr itm) 2 3)) op) ) ) ) -1 ) (close op) ) ) (princ) ) (vl-load-com)
    1 point
  4. One of the things with color is if its bylayer then it does not have a color in the entget, no 62, so if its nil then you need to get the Layer color. Test (entget (car (entsel "\nPick text "))) Example (setq col (vla-get-color (vlax-ename->vla-object e))) (if (= col 256) (setq col (cdr (assoc 62 (tblsearch "LAYER" lay)))) )
    1 point
×
×
  • Create New...