Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/19/2022 in all areas

  1. Old post, but always a good idea to review the Microsoft Office/Excel API reference for details on methods and properties when trying to do this kind of thing https://docs.microsoft.com/en-us/office/vba/api/excel.workbooks.open
    1 point
  2. try this; (alert "ONLY WORKS ON MTEXT Command:ASD SMART LEADER ") (setq osm (getvar 'osmode)) (defun c:asd () (command "ucs" "w") ;return to ucs (setvar 'osmode 0) (setq a (car (entsel)) ;select of text b (entget a) ;convert to list c (vlax-ename->vla-object a) ;convert ot vla? d (cdr (assoc 10 b)) ;get origin point e 140 ;text offset f 1000 ;scale g (vlax-get-property c 'width) ;width of text h (list 0.0 (* -1 e) 0.0) ;leader alignment left i (list g (* -1 e) 0.0) ;leader alignment right ) (command "ucs" "object" a) ;ucs of object (command "xline" h i "") ;xline for reference (setq xl-del (entlast)) ;for deletion of xline (setq j (getpoint h)) ;point where leader will be (if (< (distance j h) (distance j i)) ;detecting which side (setq k j l h m i) ;setting up points (setq k j l i m h)) ;setting up points (command "leader" k l m "" "" "n") ;leader (command "erase" xl-del "") ;delete xline (setvar 'osmode osm) (command "ucs" "w") ;return to ucs )
    1 point
×
×
  • Create New...