Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/02/2024 in all areas

  1. hello guys can you tell me how i can set a name instead image(question mark) for my customize toolbar, ?
    1 point
  2. Have you tried "_.-xref" instead of "_.-vltattach"...?
    1 point
  3. "all text" but image is change dimension text height. TEXT & Dimension Text are 2 different objects. Changing 'textsize does not change dims if style is set with a non zero height. Same with Text. Post a dwg.
    1 point
  4. I guess I approach the task in a different way I make rectangs that are the MView area at desired scale, matching a title block. Then make layouts to suit using Layout copy, so there is one layout to start with that has the title block in paperspace in the layout. This includes making rectangs on an angle. Something like this. (foreach att (vlax-invoke obj 'GetAttributes) (if (= (vlax-get att 'tagstring) "cell_4F3") (write-line (vlax-get att 'textstring) ofile) ) )
    1 point
  5. For single entity selection only: (defun c:test ( / MyEnt ) (while (setq MyEnt (car (entsel "\nSelect entity to delete"))) (command "erase" MyEnt "") ) ; end while (princ "OK") (princ) ) For multiple entity selections: (defun c:test ( / MyEnt ) (princ "\nSelect entity to delete") (while (setq MyEnt (ssget)) (command "erase" MyEnt "") ) ; end while (princ "OK") (princ) ) I also prefer to just press the Delete key on my keyboard.
    1 point
  6. Mr@exceed, it is a great job thank you very much,
    1 point
  7. If touch means only requires accuracy at the level of a rectangle circumscribing the selected object. It can be implemented simply like this. ; TOUCHSEL - exceed 2024.06.25 ; Selects all objects that touch the selected object's bounding boxes. (defun c:TOUCHSEL ( / ss ssl i ss_all ent obj bbox llp urp ss2 ss2l j ent2 ) (vl-load-com) (if (setq ss (ssget)) (progn (setq ssl (sslength ss)) (setq i 0) (setq ss_all (ssadd)) (repeat ssl (setq ent (ssname ss i)) (setq obj (vlax-ename->vla-object ent)) (setq bbox (vla-getboundingbox obj 'll 'ur)) (setq llp (vlax-safearray->list ll)) (setq urp (vlax-safearray->list ur)) (if (setq ss2 (ssget "C" llp urp)) (progn (setq ss2l (sslength ss2)) (setq j 0) (repeat ss2l (setq ent2 (ssname ss2 j)) (setq ss_all (ssadd ent2 ss_all)) (setq j (+ j 1)) ) ) ) (setq i (+ i 1)) ) (sssetfirst nil ss_all) ) ) (princ) )
    1 point
  8. Here is my version, using a Field: ;; Link Dimension to Attribute - Lee Mac ;; Prompts for selection of a Dimension and references the Dimension ;; value using a Field located in a selected block attribute. (defun c:Dim2Att ( / *error* ad at el en g1 g2 gr ms ob p1 st ) (defun *error* ( msg ) (if en (redraw en 4)) (if ad (vla-endundomark ad)) (if (not (wcmatch (strcase msg) "*BREAK,*CANCEL*,*EXIT*")) (princ (strcat "\nError: " msg)) ) (redraw) (princ) ) (while (progn (setvar 'ERRNO 0) (setq en (car (entsel "\nSelect Dimension to Link: "))) (cond ( (= 7 (getvar 'ERRNO)) (princ "\nMissed, try again.") ) ( (eq 'ENAME (type en)) (if (not (wcmatch (cdr (assoc 0 (entget en))) "*DIMENSION")) (princ "\nObject is not a Dimension.") ) ) ) ) ) (if en (progn (setq ad (vla-get-activedocument (vlax-get-acad-object)) el (entget en) p1 (trans (cdr (assoc 11 el)) en 1) ob (vlax-ename->vla-object en) st (strcat "%<\\AcObjProp Object(%<\\_ObjId " (if (and (vl-string-search "64" (getenv "PROCESSOR_ARCHITECTURE")) (vlax-method-applicable-p (vla-get-utility ad) 'getobjectidstring) ) (vla-getobjectidstring (vla-get-utility ad) ob :vlax-false) (itoa (vla-get-objectid ob)) ) (if (eq "" (cdr (assoc 1 el))) ">%).Measurement \\f \"%lu6\">%" ">%).TextOverride>%" ) ) ) (vla-startundomark ad) (redraw en 3) (princ (setq ms "\nSelect Attribute to Link to Dimension: ")) (while (progn (setq gr (grread t 13 2) g1 (car gr) g2 (cadr gr) ) (cond ( (= 5 g1) (redraw) (grdraw p1 g2 3 1) t ) ( (= 3 g1) (redraw) (if (setq at (car (nentselp g2))) (if (eq "ATTRIB" (cdr (assoc 0 (entget at)))) (progn (vla-put-textstring (vlax-ename->vla-object at) st) (vl-cmdf "_.updatefield" at "") (princ ms) ) (princ (strcat "\nObject is not an Attribute." ms)) ) (princ (strcat "\nMissed, try again." ms)) ) t ) ) ) ) (redraw en 4) (redraw) (vla-endundomark ad) ) ) (princ) ) (vl-load-com) (princ)
    1 point
×
×
  • Create New...