Jump to content

Leaderboard

  1. BIGAL

    BIGAL

    Trusted Member


    • Points

      3

    • Posts

      19,668


  2. Lee Mac

    Lee Mac

    Trusted Member


    • Points

      2

    • Posts

      21,014


  3. GLAVCVS

    GLAVCVS

    Community Member


    • Points

      2

    • Posts

      672


  4. marko_ribar

    marko_ribar

    Trusted Member


    • Points

      1

    • Posts

      2,106


Popular Content

Showing content with the highest reputation on 03/10/2025 in all areas

  1. But if for some reason you want to keep the current behavior and change the orientation at the end, the code could be like this: (defun c:TY (/) (setq old_err *error*) (defun *error* (a /) (princ "") (setq *error* old_err) (princ) ) (setvar "cmdecho" 0) (vl-load-com) (setq VlaObjLine (vlax-ename->vla-object (car (entsel "Selecciona una linea : ")) ) ) (setq LinAngle (vla-get-Angle VlaObjLine)) ;;; (if (and (< LinAngle 4.71239) (> LinAngle 1.5708)) ;;; (setq LinAngle (+ LinAngle PI)) ;;; ) (while (setq VlaObjText (vlax-ename->vla-object (car (entsel "Selecciona un texto : ")) ) ) (vla-put-Rotation VlaObjText LinAngle) (while (not (member (setq cambiar? (strcase (getstring "\n¿Rotar el texto? <No>/Si: "))) '("" "N" "NO" "S" "SI"))) (princ "\nOpcion seleccionada no valida. Repite, por favor...") ) (if (member cambiar? '("S" "SI")) (vla-put-Rotation VlaObjText (+ LinAngle PI)) ) (vlax-release-object VlaObjText) ) (vlax-release-object VlaObjLine) (setvar "cmdecho" 1) (princ) )
    1 point
  2. Note: It doesn't matter if 'LinAngle' exceeds 2PI, AutoCAD takes care of subtracting the excess
    1 point
  3. It depends on the context - this tutorial may shed some light as to the reason for the error.
    1 point
  4. (setq pt1 (getpoint "Pick zoom window first corner: ")) (setq pt2 (getcorner pt1 "Pick zoom window second corner: ")) (vl-cmdf "_.Zoom" "w" pt1 pt2)
    1 point
  5. For me just ask Length & Height, offset +ve or -ve for in / out, how many rows, how many columns and draw it. Get a copy of my Muti getvals.lsp here in Downloads can do front end for you.
    1 point
  6. Interesting ""Windows Speech Recognition," and then use the shortcut Windows logo key + Ctrl + S to activate it. Typed dimsub then spoke T Y P a box appeared then did accept. !typ = "TYP " very close. It did 1st go put EYP in command line. So I think I need to train it more. Can turn on and off microphone by voice. If I have time may play more.
    1 point
  7. For a "fixed" default, you can use something like the following: (defun c:dimsub ( / enx grp idx new pos sel str ) (if (= "" (setq str (getstring t "\nSpecify string <TYP>: "))) (setq str "TYP") ) (if (setq sel (ssget "_:L" '((0 . "*DIMENSION")))) (repeat (setq idx (sslength sel)) (setq idx (1- idx) enx (entget (ssname sel idx)) grp (assoc 1 enx) ) (if (setq pos (vl-string-search "\\X" (cdr grp))) (setq new (cons 1 (strcat (substr (cdr grp) 1 pos) "\\X" str))) (setq new (cons 1 (strcat "<>\\X" str))) ) (entmod (subst new grp enx)) ) ) (princ) ) For a "dynamic" default, you can use one of the methods I describe here.
    1 point
  8. It was a quick one and if it works can make it run faster - I'll see if i get time this week to make an edit to the code
    1 point
  9. I found the opposite a overshoot that should be fixed to. Another but ugly
    1 point
×
×
  • Create New...