Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 08/06/2021 in all areas

  1. Only change this string: (setq sel1 (ssget "X" '((0 . "DIMENSION") (-4 . "<NOT") (8 . "ARROWDIM") (-4 . "NOT>"))))
    2 points
  2. Be aware that command calls AND entdel will not delete items on all layouts. You have to use vla-delete. ;; Exampe to erase all polylines (if (setq s (ssget "_X" '((0 . "LWPOLYLINE")))) (foreach e (mapcar 'cadr (ssnamex s)) (vl-catch-all-apply 'vla-delete (list (vlax-ename->vla-object e))) ) )
    1 point
  3. I do like that that snippet better Glad you can make use of the code I provide! That current path code with the reactor saves me sooooo much time browsing around our network.
    1 point
  4. In AutoCAD there has always been multiple ways to do one thing. Just go with the one your most comfortable with. In the end you are the one using the lisp dont over think it right now. once you start to understand the process better you could always change it if you want to. I was looking over old code of mine recently and was like "LOL what was i thinking"
    1 point
  5. Try: (defun C:DNTE (/ pt1 pt2 text); = Dimension No Text or Extension (command "_layer" "_m" "ARROWLINE" "_c" "1" "" "_lw" "0.30" "" "") ;CREATE NEW LAYER (setvar "CLAYER" "ARROWLINE") (command "-DIMSTYLE" "R" "_DIM") (setq pt1 (getpoint "\nFirst point: ") pt2 (getpoint "\nSecond point: ") text (getstring "\nDim Text: ") ); setq (command "_dimaligned" "_none" pt1 "_none" pt2 "_text" text pause) ); defun
    1 point
  6. @ILoveMadoka: To answer your question definitively, i.e. using the VLA equivalent, lido's solution is the one you are looking for. Beware, however, that the use of vla, vlax functions is not always the best. Often the entmake function is much more powerful and flexible than the vla-add function, the hatches created with vla functions are extremely cumbersome. (setq A3 (ssget "_X" '((2 . "SW_CEN*")))) (command "_.erase" A3 "") This is the quickest solution, in my opinion, and it is the one you wrote down. I often use it out of laziness and my friend mhupp will agree with me!
    1 point
  7. That is the Variable Value for the DIMSCALE variable, as shown in the SYSVDLG screenshot. I don't know how to do it with lisp, I would use the Action Recorder for that. Another way to do it would be to include it in your default Template as the Current DimStyle, then you hit the ground running.
    1 point
  8. Would massprop do Mass: 28716335.8463 Volume: 28716335.8463 Bounding box: X: 8385.1459 -- 9240.2806 Y: 2515.2082 -- 3370.3430 Z: 0.0000 -- 50.0000 You write the answer to a file then reread it so read lines 4,5,6 = length width height bit rough but closer than nothing.
    1 point
  9. Stefan only problem is must have Doslib loaded. But same as Multi radio must load 1st. Not every one has doslib downloaded thats why I try to not use it. Adds to the complexity of getting user to download and install. Have enough problems getting end users to run provided code. (load "DOSLib23x64.arx") (if (not AH:Butts)(load "Multi Radio buttons.lsp")) (if (not but)(setq but 1)) (setq request (strcat (ah:butts but "V" '("Choose day " "Monday" "Tuesday" "Wednesday" )) ".pdf")) But yes Doslib has some great functions 1 do use is progress bar.
    1 point
  10. @ILoveMadoka In your first post you asked for the easiest way to delete the selection set A3. I repeat, to do this, confutatis's answer is correct. If you want to delete the entities (objects) one by one from the selection set with the vla-delete function, then in your last post replace (vla-delete SEL) with (vla-delete Obj). On the other hand, you have to do SEL nil because an AutoLISP application cannot have more than 128 selection sets open at once.
    1 point
  11. Not with an AutoCAD linetype but those end marks could either be added with lisp or used to create the lines with end marks on a specific layer and properties.
    1 point
  12. Electrical layout? I'm having flashbacks. http://www.designmaster.biz/products/electrical/index.html
    1 point
×
×
  • Create New...