Jump to content

Leaderboard

  1. Dana W

    Dana W

    Trusted Members


    • Points

      17

    • Content Count

      5,069


  2. Cad64

    Cad64

    Moderators


    • Points

      9

    • Content Count

      8,507


  3. ronjonp

    ronjonp

    Trusted Members


    • Points

      8

    • Content Count

      1,782


  4. tombu

    tombu

    Trusted Members


    • Points

      8

    • Content Count

      1,312



Popular Content

Showing content with the highest reputation since 04/15/2021 in all areas

  1. 3 points
    This seems to work: (setvar 'measurement 1) (command "._-SCALELISTEDIT" "_Reset" "_Yes" "_Exit")
  2. 2 points
    That is a myth, open up any book from any version and look at the list of commands in AutoCAD LT the very first entry is and has always been 3DPOLY What LT is missing are many of the 'tools' for working with 3D and LT cannot create 3D solids, meshes etc. but it can certainly open a drawing that contains them and it does have a whole load of tools for getting around and viewing 3D modelspace. We have 3D views, the 'hide' command to better visualize 3D models. Measurements are taken accurately from 3D points. In fact one question that comes up regularly in LT forums is how to get rid of 3D data and change it to 2D (unfortunately that is also a problem in LT with its limited set of tools and commands). But 3D space in LT is very real, and very useablein LT. The list of commands that work only in a 3D model within LT are not always in the Ribbon or Menu, but they are there eg hide, shademode, 3D views, vpoint, even the UCS command. And most commands will work within 3D space 'Align' prompts for 3 sets of points as source and destination and works perfectly fine for aligning 3D geometry. Many types of geometry have to be coplaner "flat" eg ployline, but there are no restrictions on the orientation of that plane in 3D space and by altering the UCS and the viewing angle you can draw a 3D box using the polyline command. Yes LT cannot create or edit 3D solids, but it is capable of so much more in a 3D modelspace, and LT is definately not ONLY 2D
  3. 2 points
    Just guessing check the dimension's Text Offset value in the Properties Palette If it's negative remove the minus sign.
  4. 2 points
    There have been a few times in the past where I had to work on someone else's drawing and they had overlapping viewports with the viewport frames turned off. Their drawing filled the entire space within the title block border, so I double clicked inside the border to get into model space but was unable to select anything inside the smaller viewports. Talk about frustrating. I finally figured out what they had done but it took me a minute to realize there were other viewports on top of the main viewport.
  5. 2 points
    The one situation that causes me worry about overlapping viewports is when neither has enough blank space to keep the model geometry from overlapping. I go to an extra page for that one. There's too much overhead in time needed to set up a screening mask or wipeout in modelspace on a special layer that only hides stuff in one viewport while being frozen in all the others. Then suppose somebody else has to edit that sucker, with a giant invisible background color wipeout or hatch hiding half the universe.
  6. 2 points
    Using that in the drawing I'm working on now. Never had an issue that way.
  7. 2 points
    I agree with Tombu about avoiding viewports on top of viewports. I don't know of any known issues caused by doing this, it's just my own personal preference. For something like this, I would create a polygonal viewport for my main view so I can create a space for my smaller viewport.
  8. 2 points
    There's no such thing as an "angle guide" in AutoCAD. Do you mean your Polar Tracking was turned off?
  9. 1 point
    Tomorrow I will try it. Thank you so much for everything.
  10. 1 point
    Glad to help Here is a version to rotate all objects with a rotation property: (defun c:foo (/ a e o s) (if (and (setq e (car (entsel "\nPick something to match rotation: "))) (setq a (cdr (assoc 50 (entget e)))) (setq s (ssget ":L")) ) (foreach e (vl-remove-if 'listp (mapcar 'cadr (ssnamex s))) (if (vlax-property-available-p (setq o (vlax-ename->vla-object e)) 'rotation) (vla-put-rotation o a) ) ) ) (princ) )
  11. 1 point
    @ronjonp & @tombu many thanks to both of you and your valuable contributions ... both of your suggestions work perfectly ! thanks again
  12. 1 point
    This has nothing to do with a higher power, but it will match the ANGLE of a picked block to a selection. (defun c:foo (/ a e s) (if (and (setq e (car (entsel "\nPick a block to match rotation: "))) (setq a (cdr (assoc 50 (entget e)))) (setq s (ssget ":L" '((0 . "INSERT")))) ) (foreach e (vl-remove-if 'listp (mapcar 'cadr (ssnamex s))) (vla-put-rotation (vlax-ename->vla-object e) a) ) ) (princ) )
  13. 1 point
    Then there is no need to convert your Texts to Mtexts, so the following should change the similar text strings automatically that reside into your current active space. (defun c:Test (/ sel lst int ent) ;; Tharwat - Date: 20.Apr.2021 ;; (and (or *inc_* (setq *inc_* 1)) (setq *inc_* (cond ((getint (strcat "\nSpecify increment number < " (itoa *inc_*) " > : " ) ) ) (*inc_*) ) ) (while (and (setq sel (car (entsel "\nSelect Text to add increment suffix : ")) ) (= (cdr (assoc 0 (setq lst (entget sel)))) "TEXT") (setq int -1 sel (ssget "_X" (list '(0 . "TEXT") (assoc 1 lst) (cons 410 (getvar 'CTAB)) ) ) ) (while (setq int (1+ int) ent (ssname sel int) ) (setq lst (entget ent)) (entmod (subst (cons 1 (strcat (cdr (assoc 1 lst)) "xPos." (if (> 10 *inc_*) (strcat "0" (itoa *inc_*)) (itoa *inc_*) ) ) ) (assoc 1 lst) lst ) ) ) (setq *inc_* (1+ *inc_*)) ) ) ) (princ) )
  14. 1 point
  15. 1 point
  16. 1 point
    Yeah, I was just throwing it out there as a possible alternative. It would be good if muck would come back and join in the conversation at some point, so we can get some feedback and maybe more information about what his company's current situation and needs are. Otherwise, we're just talking amongst ourselves.
  17. 1 point
    You should post your code .. many times the algorithm can be improved upon.
  18. 1 point
    You're welcome anytime. Yes the routine to find attributed blocks that reside in current active space only. Group Code (66 . 1) is to consider attributed blocks only. 'sum' is just a variable name.
  19. 1 point
    AutoCAD LT = US$440/year BricsCAD LT = US$350/year and that includes support for autolisp, dcl, etc. (and is available as a perpetual for one-time cost of US$560)
  20. 1 point
    My first contact with AutoCad was R12 or 13. My boss used it for mechanical drawings. I think AutoCad is only limited to your imagination. I've tried solidworks before......I'm still an AutoCad fan. Not that I'm saying solidworks is bad just AutoCad is my choice. Buying LT (To me) would be like buying a Volkswagen beetle when you need a truck. But you also have to look at $1700+ per year vs. $440 per year. I'm not arguing for AutoCad over LT but the customer/user needs to look at exactly what it will be used for.
  21. 1 point
    Hi All, there will likely be some dissruption to the forum this week. We are upgrading to the latest version of the forum software, and this will mean the forum will be closed for a few hours while the upgrade takes place. Once the upgrade is complete, you may notice a few differences to the interface and there are also some new features. I'll provide more information once the upgrade is complete.
  22. 1 point
    Great! it works just how I need it! Thanks so much!
  23. 1 point
    AutoCAD LT doesn't do 3D, in the sense that it is incapable of providing a professional level 3D modeling environment. It is like trying to investigate the Titanic wreck with SCUBA gear. If your office runs on 3D, then LT is not your software.
  24. 1 point
    I did not see move viewport to side do zooming etc lock and move back if must overlap. That is pretty simple or am I missing something. Never had problems with multiple viewports.
  25. 1 point
    Also answered here: https://stackoverflow.com/questions/67124190/multiple-commands-within-a-lisp-routine
  26. 1 point
    try setting UCSFOLLOW to 0 dJE
  27. 1 point
    I have all my viewport frames on a layer with the plot icon clicked to "X". Frames are sometimes nice to have but viewports never seem to fit each other, so I draw the frames if needed. My prior office standards didn't require any, but sometimes they help. i got used to none so I carried it over into retirement for my own hobby templates.
  28. 1 point
    (command "._-SCALELISTEDIT" "_Reset" "_Yes" "_Exit") This will reset the current scale list but it will not change to Metric defaults. I don't know of a way to change the defaults. I would've thought this would be in the "UserPreferences" ActiveX object, but no property is exposed for this in Visual Lisp as far as I can tell. Maybe it is settable in the Registry? EDIT - As far as I can tell by my research. There is no way to reset Metric defaults via Lisp. What other users have done is just write a program to recreate the entire scale list to their choosing, even if to match the default scale list. See the attached file I found on the Autodesk Forums - not sure who the original author is. scalelistreset.lsp
  29. 1 point
    I'd go KISS on this one and set up a template drawing with my "custom" scale list already in it. No lisp required.
  30. 1 point
    Instead of (command "_move" (ssget "_x" '((0 . "INSERT")(2 . "*legend*"))) "" "0,0" "23.1,21.0451") create the selection set first then test sslength > 0 before using a command on it.
  31. 1 point
    The modelspace objects are probably just zooming off to one side or the other. While you are in paperspace zoom in to basically fill your screen with the smaller viewport. Activate the small viewport and zoom extents to get you centered up again. Then use Zoom Window so your objects will always be in the center of the view after zooming. It may take a few windows when you are that far away from your stuff. Once you are closer in go back to the wheel. Make sure you are actually active in the correct viewport. I don't completely enclose one viewport within another if I can help it just to make it easier. You can use Ctrl+R to cycle through your viewports till you hit the correct one. But I simply drag one edge of the smaller viewport until it is outside of the larger viewport. It doesn't matter to me whether it is dragged inside or outside the paper edge because I don't plot my viewport frame. Now I can click into and out of the non overlapping area without the viewport gremlins getting out of hand. Then if I like, I can drag the edge back where my OCD is more happy with me If you use Ctrl+R, always type PSPACE or dbblclk out of the last viewport when you are done. You don't want to leave viewports open. Video memory is reserved for them and can affect system performance.
  32. 1 point
    Just post one of the simplest routines if you want it fixed. The solution to the rest will probably be the same.
  33. 1 point
    Make sure polar tracking and dynamic input are turned on.
  34. 1 point
    If I understand you correctly, want to zoom to all your text with a color index of 7? If that is the case this should work for you: (defun c:abc123 (/ ss) (if (setq ss (ssget "X" '((0 . "*TEXT")(62 . 7)))) (progn (command "zoom") (mapcar 'command (acet-geom-ss-extents ss 1)))))
  35. 1 point
    @Acey You may be referring to dynamic input. Give the dynmode command and set it to 1 and see if that restores the feature you are looking for.
  36. 1 point
    There are hundreds of system variables, and they control all sorts of things, including the user interface. These variables can get turned on and off by code without notice. It's a good idea to become familiar with these variables, if only to protect yourself from erratic behavior such as you're seeing here. OP may be referring to polar tracking, as tombu notes, or it could be the crosshairs, or something else. Without a picture or other information, it's hard to tell. Welcome to the forum, Acey. The more information you can give us, the better we can help you.
  37. 1 point
    You can also use the fnsplitl function: _$ (fnsplitl "C:\\test.txt") ("C:\\" "test" ".txt")
  38. 1 point
    AutoCAD Electrical is part of the AutoCAD Toolset, so it comes free with AutoCAD.
  39. 1 point
    nanoCAD 8.5 supports lisp. The Pro version (2D & 3D) cost is $290 USD. nanoCAD - low cost CAD Software - free download and buy - for Industrial Engineering, DWG and 3D CAD/CAM Design
  40. 1 point
    i realy like the ,metxt, part
  41. 1 point
    Just describe a repetitive scenario to your supervisor that consists of doing many different things using several different commands and show him how much time you save by having all of those commands combined into one lisp routine that does it all with a simple keyboard command or mouse click. Then multiply that time saving over an entire day, using many different lisp routines for different tasks. Or maybe you could explain it by using a real world scenario, like making a phone call. In the old days, before cell phones, you had to walk over to the phone on your desk, pull out your phone book and manually dial the number on the keypad. With a cell phone, you just tap on the person in your contacts and the call is sent. That's kind of like a lisp routine. Combining several actions into one simple command.
  42. 1 point
    also making use of 'dcl defun' suggested by master Lee to make the code more compact : rb : radio_button {fixed_width=true;width=18;} eb : edit_box {fixed_width=true;width=18;} parcel : dialog {label=" Parcel with columns"; spacer; : row { : column {children_fixed_height=true; :boxed_radio_row {label="Test1"; :rb {label="Polyline";key="tpol";value="1";} :rb {label="Mtext";key="tmtex";}} :boxed_radio_row {label="Test2"; :rb {label="Color";key="ttep";value = "1";} :rb {label="LineWeight";key="ttem";}} :boxed_radio_row {label="Closed Polyline"; :rb {label="In";key="tiin";value="1";} :rb {label="Out";key="tiout";}} :boxed_radio_row {label="UnClosed Polyline"; :rb {label="Up";key="tiup";value="1";} :rb {label="Bottom";key="tibottom";}} } : column {children_fixed_height=true; :boxed_row {label="Value 1";:eb {key="eb_val1";}} :boxed_row {label="Value 2";:eb {key="eb_val2";}} :boxed_row {label="Value 3";:eb {key="eb_val3";}} spacer;spacer;spacer; } } spacer; :column {:row {fixed_width=true;alignment=centered; :button {key="bt_save";label="Save";}:button {is_default=true;key="bt_exit";label="Exit";}}} } parcel2 : dialog {label="Parcel with rows";spacer; : row {:column {label="Test1";:radio_row {:rb {label="Polyline";key="tpol";value="1";} :rb {label="Mtext";key="tmtex";}}} :eb {label="Value 1";key="eb_val1";}} : row {:column {label="Test2";:radio_row {:rb {label="Color";key="ttep";value = "1";} :rb {label="LineWeight";key="ttem";}}} :eb {label="value 2";key="eb_val2";}} : row {:column {label="Test3";:radio_row {:rb {label="In";key="tiin";value="1";} :rb {label="Out";key="tiout";}}} :eb {label="value 3";key="eb_val3";}} : row {:column {label="UnClosed Polyline";:radio_row {:rb {label="Up";key="tiup";value="1";} :rb {label="Bottom";key="tibottom";}}}spacer;:row {width=18;}} spacer; :column {:row {fixed_width=true;alignment=centered; :button {key="bt_save";label="Save";}:button {is_default=true;key="bt_exit";label="Exit";}}} }
  43. 1 point
    that works too Lee, more than one road lead to Rome
  44. 1 point
    The key is to define the radio_button tiles to each have the same fixed width, large enough to accommodate the largest of your labels; for this, I would suggest defining a custom radio_button tile which may then be used through the remainder of the dialog definition, e.g.: rb : radio_button { width = 18; fixed_width = true; } test : dialog { spacer; : boxed_column { label = "Test 1"; : radio_row { : rb { key = "tpol"; label = "Polyline"; } : rb { key = "tmtx"; label = "MText"; } } spacer; } : boxed_column { label = "Test 2"; : radio_row { : rb { key = "ttep"; label = "Colour"; } : rb { key = "ttem"; label = "Lineweight"; } } spacer; } ok_cancel; }
  45. 1 point
  46. 1 point
    Here you go with UNTESTED function. Your attributed block must be regular and not dynamic in this case, and inserted only once into your drawing since the following function get the info from the firstly found block. Waiting for your kind reply. (defun TH:Attribute:value:to:custom:key ( att:blk:name tag:name custom:key / att sum int) ;; Tharwat - Date: 22.Mar.2021 ;; (and (setq sel (ssget "_X" (list '(0 . "INSERT") (cons 2 att:blk:name) '(66 . 1) (cons 410 (getvar 'CTAB))))) (foreach obj (vlax-invoke (vlax-ename->vla-object (ssname sel 0)) 'Getattributes) (and (= (vla-get-tagstring obj) tag:name) (setq att (vla-get-textstring obj)) ) ) (setq sum (vla-get-SummaryInfo (vla-get-ActiveDocument (vlax-get-acad-object)))) (repeat (setq int (vla-numcustominfo sum)) (and (setq int (1- int)) (progn (vla-getcustombyindex sum int 'name 'value) (and name (= name custom:key)) ) (not (vl-catch-all-apply 'vla-removecustombykey (list sum name))) (vla-addcustominfo sum name att) ) ) ) (princ) ) (vl-load-com)
  47. 1 point
    yikes! myself i'll probably retire in 2040 or so. Or at least that's how long I think it will take. Drafters don't make much unless you play your cards right. We don't make no engineer salary. Although a civil engineer buddy of mine became a drafter because he got bored which is a pretty hilarious story. Imagine being a drafter making engineer salary lol. Last I talked to him he was still working at that place making insane money. I figured 17 years in I would be doing alot better - but I have a feeling I'm not alone in this boat. -ChriS
  48. 1 point
    And I'm over here still typing all my commands in.
  49. 1 point
    Two! rectangle and array
  50. 1 point
    I would suggest that you stop using annotative scaling for your dimensions and text, take them out of model space and put them in your paper space layout. A lot less hassle and few if any system variables to deal with.
  • Newsletter

    Want to keep up to date with all our latest news and information?
    Sign Up
×
×
  • Create New...