Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 08/13/2025 in all areas

  1. One of the others ways to do this is to use a lisp and break the string into individual bits. As you have a "-" as a common item in the string you can blow it apart and rejoin. Thanks to Lee-mac parse lsp. Something like this. ; Parse string to a list ny Lee-mac (defun csv->lst (str ans / pos ) (if (setq pos (vl-string-position ans str)) (cons (substr str 1 pos) (csv->lst (substr str (+ pos 2)) ans)) (list str) ) ) (setq str "XXX-ZINC-XX-XX-DR-C-01000_S278 Sections") ; use (getvar 'dwgname) (setq newstr "" x 0) (setq ans (csv->lst str 45)) (repeat (- (length ans) 2) (setq newstr (strcat newstr (nth x ans) "-")) (setq x (1+ x)) ) (setq newstr (strcat newstr (nth x ans))) Ps ; tab 9 space 32 (chr 32) comma 44 semicolon 59 slash / 47 - 45
    1 point
  2. @maahee It is not clear what you want to calculate. Please respond to the following questions. Should the program be able to handle lines? ... lwpolylines without arc segments? ... lwpolylinese with arc segments? arc objects? circle objects? If the open/close property of a polyline is "open" sould the polyline be considered a closed shape defined by a line segment from the last vertex to the first vertex? The code in your last post dows nothing if the object is not a line. If it is a line it adds a dim line but does not identify the "center".
    1 point
×
×
  • Create New...