Jump to content

All Activity

This stream auto-updates

  1. Past hour
  2. Lisp ObjBoundary involves creating frames for different objects (not just blocks), so the insertion point should not be taken into account here (imho)...
  3. Nikon

    Toggle dimension LISP

    This is great code, but Top Left and Top right does not move the leader up. Is it possible to sort through the placement options by clicking on the dimension (without using the dialog box)?
  4. Yesterday
  5. BIGAL

    Toggle dimension LISP

    Multi radio buttons.lspGive this a try. ; https://www.cadtutor.net/forum/topic/97280-toggle-dimension-lisp/ ; dim_sample.dwg move dime to one of the 4 quadrants ; By AlanH April 2025 (defun c:dodimcorner ( / ent obj dotl dotr dobl dobr) (defun dotl ( / ) (setq tpos (mapcar '+ (cdr (assoc 13 entg))(list 0 dimsc 0.0))) (vlax-put obj 'TextMovement 1) (vlax-put obj 'TextPosition tpos) ) (defun dotr ( / ) (setq tpos (mapcar '+ (cdr (assoc 14 entg))(list 0.5 dimsc 0.0))) (vlax-put obj 'TextMovement 1) (vlax-put obj 'TextPosition tpos) ) (defun dobl ( / ) (setq tpos (mapcar '+ (cdr (assoc 13 entg))(list 0.0 (- dimsc) 0.0))) (vlax-put obj 'TextMovement 1) (vlax-put obj 'TextPosition tpos) ) (defun dobr ( / ) (setq tpos (mapcar '+ (cdr (assoc 14 entg))(list 0.0 (- dimsc) 0.0))) (vlax-put obj 'TextMovement 1) (vlax-put obj 'TextPosition tpos) ) (if (not AH:Butts)(load "Multi radio buttons.lsp")) ; loads the program if not loaded already (setq ent (car (entsel "\nPick a dim "))) (setq entg (entget ent)) (setq obj (vlax-ename->vla-object ent)) (setq dimsc (vlax-get obj 'scalefactor)) (if (= but nil)(setq but 1)) (ah:butts but "V" '("Choose a corner" "Top Left" "Top right" "Bottom left" "Bottom right" )) (cond ((= but 1)(dotl)) ((= but 2)(dotr)) ((= but 3)(dobl)) ((= but 4)(dobr)) ) (princ) ) (c:dodimcorner)
  6. Hi Nikon Isn't more easy, in your case, to get the insertion point as the lower-left corner, and for the top-right corner just add the width, height? Multiplied with the scale, if necessary.
  7. Nikon

    Toggle dimension LISP

    Is such an algorithm possible for this task? Select dimension: 1st click on the dimension - dimtext moves along with the leader Top Left 2 st click - dimtext moves along with the leader Top right 3 st click - dimtext moves along with the leader Bottom left 4 st click - dimtext moves along with the leader Bottom right. The offset from the dimension line should be equal to the height of the text (or two text heights).
  8. Hi @GLAVCVS thanks! This code makes the block Obedient. Muchas gracias! Es super! Te debo otra taza de cafe...
  9. Use it on any block of this type and save it
  10. Hi Try this (defun c:makeBlockObedient (/ conj it n e le) (princ "\nSelect block to analyze...") (if (setq conj (ssget '((0 . "INSERT")))) (while (setq it (ssname conj (setq n (if n (1+ n) 0)))) (while (/= (cdr (assoc 0 (setq le (entget (setq e (entnext (if e e it))))))) "SEQEND") (if (assoc 60 le) (if (setq p (getpoint (cdr (assoc 10 le)) "\nInvisible attribute detected: Indicates its new position (RIGHT CLICK to skip)...? ")) (vla-move (vlax-ename->vla-object e) (vlax-3d-point (cdr (assoc 10 le))) (vlax-3d-point p)) ) ) ) ) ) (princ) )
  11. Steven P

    number texts with pick...help

    I did this using Lee Macs Copy Swap Text LISP as a basis, adding in the increment portion as required.
  12. Imho use vectors. Note angleTo is overloaded to take a normal @Ap.Command() def doit(): try: db = Db.curDb() p1 = Ge.Point3d(0, 0, 0) p2 = Ge.Point3d(0, 100, 0) vx = Ge.Vector3d.kXAxis vz = Ge.Vector3d.kZAxis d = p2 - p1 dn = p1 - p2 arc1 = Db.Arc(Ge.Point3d(0, 50, 0), 50, d.angleTo(vx, vz), dn.angleTo(vx, vz)) arc1.setColorIndex(5) arc2 = Db.Arc(Ge.Point3d(0, 50, 0), 50, dn.angleTo(vx, vz), d.angleTo(vx, vz)) arc2.setColorIndex(1) db.addToModelspace(arc1) db.addToModelspace(arc2) except Exception as err: traceback.print_exception(err)
  13. Vica

    Cursor size

    Yes It's perfect This is exactly what I need Thank you so much
  14. Cadkiller

    Bevel (slope) Label

    Big Al, I’m not sure I understand. These drawings were created with SDS2 and the material is hyperlinked which is probably why the part mark is coming out of the selected linework. I probably should just sent you an AutoCAD drawing instead.
  15. BIGAL

    number texts with pick...help

    You have many posts so you should know by now all the functions required, so have a go. pick text then atoi (while pick text next number check is 2 or 3 digits <10 <100 so pad with "0" update text entmod or vlax-put 'textstring ) end while
  16. Have a look at this it is multiple defuns. But open a file is there. Alan Excel library.lsp
  17. BIGAL

    Bevel (slope) Label

    Ok can see need to be 4" line with correct 12 as label understand, can do. the 3rd value is internal angle. Watch this space. Just a comment something wrong with label here are you manually drawing rather than say strcat two texts together ? Can do a lisp etc enter prefix enter suffix. 1-hss4 is result. Just have a custom text command. The prefix is remembered change at any time.
  18. Last week
  19. No Simply modifying the matrix blocks will solve the problem. If no one can do it on your own, or if no one has done it before, then I'll help you do it tomorrow.
  20. hello all: some routine to number like this... 1.-Select a source text with numeric data. example "002" 2.- Then select the texts one by one and number them, giving them the consecutive number to the original value. 3.-Modified texts will always have 3 digits at the end. example: 001 , 034, 100....
  21. If the attributes are inside the block, then the frame is created correctly. Do I always need to check for hidden attributes? It's a little uncomfortable...
  22. What a good code! Thanks! Is it possible to configure the creation of a frame for dynamic blocks with attributes that go beyond the block? Is it possible to ignore this in the code so that attributes are not taken into account when creating the frame?
  23. I guess you should just move those attributes a little to the right and make them invisible again.
  24. Use this to see for yourself (defun c:todovis (/ cj n ent lstent) (if (setq cj (ssget "x" '((60 . 1)))) (while (setq ent (ssname cj (setq n (if n (1+ n) 0)))) (entmod (append (entget ent) (list '(60 . 0)))) ) ) (princ) )
  25. There are a couple of 'ATTDEF' objects with the 'VISIBLE' property disabled.
  26. Hi @GLAVCVS The blocks are obedient, but the bounding box is disobedient... OBJBOUNDARY.dwg
  1. Load more activity
×
×
  • Create New...