Jump to content

Leaderboard

  1. BIGAL

    BIGAL

    Trusted Member


    • Points

      3

    • Posts

      19,668


  2. GLAVCVS

    GLAVCVS

    Community Member


    • Points

      3

    • Posts

      673


  3. marko_ribar

    marko_ribar

    Trusted Member


    • Points

      2

    • Posts

      2,106


  4. aridzv

    aridzv

    Community Member


    • Points

      2

    • Posts

      331


Popular Content

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

  1. See attached code. 1. run the lisp in paper space. 2. the lisp prompt you to select a point on the block IN PAPER SPACE!! - click on the block. 3. click on the start point of the MLeader arrow - you are in paper space, no wories... 4. place the MLeader. 5. if you want to label another block go ahead. 6. to exit hit escape key or mouse right click. EDIT: the lisp works in model space as well. (defun c:MLeaderWBlname( / *error* temperr osnp tm tagname ptms ss ensel obj obj1 nam);ptps ptps1 (setq temperr *error*);store *error* (setq *error* trap1);re-assign *error* (setq osnp (getvar "OSMODE")) (setvar "OSMODE" 0) (setq tm (getvar "TILEMODE")) (princ "Select object in paper space,select start point of MLeader,exit with esc'") (while 1 (if (= tm 0);if in paper space (progn (getpoint) ;;get point in paper space on the target object (command "._MSPACE") (setq ptms (cadr (grread t)));;get the point where the cursor is on the target object in model space (setq ss (ssget ptms));;selction set of the object crossing the ptms point (setq obj(ssname ss 0)) (command "._PSPACE") );progn (progn ;in model space (setq ensel (entsel "\nSelect Block: ")) ;select the block object to copy (setq obj (car ensel)) ;set the block object to varaible );progn );if (setq obj1 (vlax-ename->vla-object obj)) (setq nam (vlax-get-property obj1 (if (vlax-property-available-p obj1 'effectivename) 'effectivename 'name ) ) ) (command "_mleader" "H" pause pause nam) );end while (setq *error* temperr) (princ) ) (defun trap1 (errmsg) (command "._PSPACE") (SETVAR "OSMODE" osnp) (princ) )
    2 points
  2. The function EXTRACTNUMBER has been added. The code works. Thanks!
    1 point
  3. THANKS A LOT! you are the best ! many thanks have a nice day
    1 point
  4. If you submit integers to the divide function, the result will be an integer. See help ... This is possible: remove the variable "op" from local variables, which could give: (defun c:CalcTwoTxt ( / ss1 ss2 val1 val2 key rslt inspt) (princ "\nSelect first text") (while (not (setq ss1 (ssget "_+.:E:S" '((0 . "*TEXT")))))) (princ "\nSelect second text") (while (not (setq ss2 (ssget "_+.:E:S" '((0 . "*TEXT")))))) (setq val1 (extractnumber (cdr (assoc 1 (entget (ssname ss1 0)))))) (setq val2 (extractnumber (cdr (assoc 1 (entget (ssname ss2 0)))))) (cond ((and val1 val2) (if (not op) (setq op "+")) (initget "* + - /") (setq key (getkword (strcat "\nSelect an operation [*/+/-/\/]? <" op ">: "))) (if key (setq op key)) (if (and (eq op "/") (member 0 val2)) (setq rslt 0.0) (setq rslt (apply (read op) (append val1 val2))) ) (initget 1) (setq inspt (getpoint "\nSpecify the insertion point of the result: ")) (command "_.TEXT" inspt "2.5" "0" (rtos rslt 2 2)) ) (T (princ "\No value found in text")) ) (prin1) )
    1 point
  5. Shouldn't it be better, for example, '(polar p1 0.79 1))'?
    1 point
  6. @maahee Are you sure that this point '(polar p1 (* pi 1.75) 1))' will lie inside the rectangle?
    1 point
  7. Just an idea for internal boundaries, not just one, if you make a list of ((area1 ent1)(area2 ent2)...) you can sort on areas the only one to keep is the second largest area, you have entity names so can erase all the others. Have a go plenty here will help if you get stuck.
    1 point
  8. think I left in something I was trying - edited now
    1 point
  9. https://www.lee-mac.com/outlineobjects.html Or manually change all rectangles to regions then use the union command.
    1 point
  10. Nikon, you forgot to add open and closing brackets for v1 and v2... Like I said it should be : (atof v1) and (atof v2)...
    1 point
  11. Whereever in the code occurs v1 or v2, change them to (atof v1) and (atof v2)...
    1 point
  12. Easy solution NO CODE, draw a closed pline around your shapes, Type Bpoly, pick point between shapes and out side pline, a pline around outside of shapes should be there now erase outer plines, yes plines as bpoly adds one to outside.
    1 point
  13. Hi Maahee It's better if you attach a drawing
    1 point
  14. To keep the dimension associated with the measurement, I'd create a new style identical to the current one, only without the diameter symbol. Change the name by one letter so it shows up next to the original in the list, and you'll remember to update both styles if that becomes necessary.
    1 point
  15. @vindicate Turnoff the Dynamic UCS and apply @Cad64 approach using construction line.
    1 point
  16. Enter the diameter value in the Text overide box of the properties panel. Note that the dimension will no longer be associative.
    1 point
  17. Can you not just click on the dim and in properties just remove the %%d or the dia symbol. You can overwrite any dim, if you replace the text with <> it should revert back to the actual distance.
    1 point
  18. One way to do this would be to draw a temporary construction line from endpoint to endpoint. Then you can draw a circle at the midpoint of that line and then delete the line. Also, working in 2D wireframe mode, instead of Xray mode, makes it easier to work without the faces getting in the way.
    1 point
×
×
  • Create New...