Jump to content

Leaderboard

Popular Content

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

  1. It is not necessarily / required to convert an entity to vla-object when using it with any of vlax-curve* functions.
    1 point
  2. You must prefered the bitwise "&" because you can have the bit typelinegen and closed (70 . 129) (setq ss (ssget "_X" '( (0 . "LWPOLYLINE") (-4 . "<NOT") (-4 . "&") (70 . 1) (-4 . "NOT>") ) ) ) See the help
    1 point
  3. Thank you. I found some ideas there but finaly solved it like this: (defun cgpolydesc (/ lst ss i en obj) (and (setq ss (ssget "X" '((0 . "LWPOLYLINE") ; object Name (-4 . "<NOT") (70 . 1) (-4 . "NOT>"); polylines NOT CLOSED ) ) ) (repeat (setq i (sslength ss)) (setq en (ssname ss (setq i (1- i))) obj (vlax-ename->vla-object en) )
    1 point
  4. HI TRY POLYLINE DXF Group code 70 ;;;================================================== (vl-load-com) ; initialization (defun getcoords ( en / coordslst ) (setq coordslst (list)) (setq enlst (entget en)) (foreach x enlst (if (= (car x) 10) (setq coordslst (append coordslst (list (cdr x)))) ) ; end if ) ; end foreach coordslst ) ;;;================================================== (defun c:coolist (/ xml file) (setq fname "D:/coo.xml") (setq file (open fname "w")) (cgpolydesc) (close file) (startapp "notepad.exe" fname) ) ;_ end of defun ;;;================================================== (defun cgpolydesc (/ lst ss i en obj) (and (setq ss (ssget "X" '((0 . "LWPOLYLINE") ; object Name (-4 . "&=") ; bit coded (70 . 1) ; polylines are OPEN OR CLOSED ) ) ) (repeat (setq i (sslength ss)) (setq en (ssname ss (setq i (1- i))) obj (vlax-ename->vla-object en) ) ;---- (setq lst (getcoords en)) (setq idx 0) (setq xy "") (repeat (length lst) (setq xy (strcat xy (rtos (cadr (nth idx lst)) 2 8) "," (rtos (car (nth idx lst)) 2 8) " ")) (setq idx (+ 1 idx)) ) (write-line (strcat (vl-string-trim ", " xy)) file) ;---- ) ) ) ;_ end of defun 'cgpolydesc' ;;;==================================================
    1 point
×
×
  • Create New...