Jump to content

All Activity

This stream auto-updates     

  1. Past hour
  2. Today
  3. eldon

    Measure chord length

    Yes it is possible to measure the chord length simply with a bit of construction. Draw the chord and then trim all the circles to suit, and then make it all one polyline. Unfortunately, the circles in your file are not circles! The circles consist of four quarter-circle splines (or parts of). AutoCAD is not too good on splines when it comes to manipulating geometry. So I traced over your 'circles' with proper circles using the 2P option. Then with a bit of trimming, the individual entities are created, which can all be joined together with Pedit.
  4. I use a routine in acaddoc.lsp to set to change the value of "imageframe" system variable when opening a drawing. Recently I've tried to use it on a AutoCad 2007 and got an error. Seems like 2007 version doesn't have a system variable named "imageframe". I use the code below as a workaround for the problem, but I'm wondering is there a better way to change the value of "imageframe" when opening a new drawing for 2007 version? (if (getvar "imageframe") (setvar "imageframe" 2) (command "_imageframe" 2))
  5. For what it's worth, here's an existing program to handle elliptical arcs too.
  6. Meanwhile, sorry because I had not translated the title of the topic...I do it now...I always prepare the text in Italian to reread it and then try to translate it as best as possible Thank you for the indication, but with my knowledge I am very far from being able to create a working lisp program...Maybe I try to apply myself, but I hope to find a ready-to-use solution thanks for now!
  7. Hello, I need help regarding to change the linetype scale of every line on a certain layer based on its individual length. Thank you.
  8. I suggested the LAYISO command, not to adjust the size of the dialog window, but because you mentioned wanting to turn off all but one of the layers, and it is probably the fastest way to do that. As BIGAL mentioned choose SETTINGS at the commandline prompt to configure it so that it works in the way that you want it to. You could try CLOSING the Ribbon. Enter LAYER at the commandline and hit ENTER. Click on the right side window bar and select SIZE as shown in the screenshot.
  9. BIGAL

    Too many blocks How to delete some totally

    narkduffy your turn now Jonathon has provided a good routine that could be easily be changed for multiple blocks, so you need to provide info about how to choose what to delete, name or pick ?
  10. Yesterday
  11. BIGAL

    Measure chord length

    Yes there is a conveyor belt answer floating around its a few years old now, I remember the examples were as complex as yours used a pick pick for sequence. It is a fraction different as it uses tangents is that Ok ? Google I think it was here.
  12. Layiso is one of the icons in the middle of the screen grab you have posted it is in simple terms temporary turn off all layers except the 1 I want. Layuniso turns them all back on. Do layiso and settings I suggest "Off" that may be why you said nothing happening else default is a fade. Have you pushed the layer manager up to top of screen it will go like you show, grab left bar on the layer window and drag down, I managed to make it look like yours.
  13. BIGAL

    Toolbar Display

    If you have no toolbars displayed type "-TOOLBAR" "MODIFY" "SHOW" once you have 1 toolbar you can use the right click on toolbar to open more.
  14. There is various ways of getting attribute values, using Vl lisp you can get-attributes and then retrieve the values in the attribute order is this what you want. (foreach att (vlax-invoke (vlax-ename->vla-object (car (entsel "\npick block"))) 'getattributes) (setq txt (vla-get-textstring att)) (if (= txt "")(princ "nil")(princ txt)) (princ "\n") )
  15. FWIW rather than deleting the conditional, you could use the "equal" function with a fuzz factor, if the ellipses are only off by a small amount. depends on whether you need to prevent changing an ellipse that is supposed to be an ellipse. I.e. this: (setq fuz 0.005) ;; Set error fuzz value (if (equal (cdr (assoc 40 ent)) 1.0 fuz) instead of this: (if (= (cdr (assoc 40 ent)) 1.0)
  16. Hi, very often I have to check sequences of values that force me to use the dataextraction. I am attaching a file to better explain the problem...the block used as an example has two attributes, one attribute is used to indicate "the group to which it belongs", while the second indicates a progressive within the group. What I need to do is check the sequences of the second attribute and the only way I know is to use dataextraction, but it is a very inconvenient way in my opinion. Do you know a more comfortable system or lisp for this operation? Thanks in advance list attributes sequence value.dwg
  17. ezra

    Toolbar Display

    Someone please give me the step by step procedure required to display the Modify toolbar on the GUI. Thank you, Ezra Reshevsky
  18. It works like a charm! I really thank you @pkenewell and @ronjonp. Just in some cases it didn`t works but it was because Major to minor radius ratio was apparently diffetent of 1, so I just deleted the conditional and it works great.
  19. Oh thanks! I was trying to solve the problem only by setting the variables and I didn't think about the Layer State! Thanks you solved the problem!
  20. Very Nice @ronjonp! Very efficient way to retain the original layer, linetype, color, etc.
  21. Nice .. FWIW if you create the circle like so it will retain all by object properties too: (defun c:el2cir (/ cen cnt en ent maj mad) (if (setq ss (ssget '((0 . "ELLIPSE")))) (repeat (setq cnt (sslength ss)) (setq ent (entget (setq en (ssname ss (setq cnt (1- cnt)))) '("*")) cen (cdr (assoc 10 ent)) maj (cdr (assoc 11 ent)) mad (distance '(0.0 0.0 0.0) maj) ) (if (= (cdr (assoc 40 ent)) 1.0) ;; (progn (command "._circle" "_non" cen mad) (entdel en)) (and (entmake (append '((0 . "CIRCLE")) (vl-remove-if '(lambda (x) (vl-position (car x) '(-1 0 100 330 5 11 40 41 42))) ent) (list (cons 40 mad)) ) ) (entdel en) ) ) ) ) (princ) )
  22. Here is a function to do it. Note - this only works if the Major to Minor radius ratio is 1 (in other words - looks like a circle). If you want it different then let me know. (defun C:EL2CIR (/ cen cnt en ent maj mad) (if (setq ss (ssget '((0 . "ELLIPSE")))) (repeat (setq cnt (sslength ss)) (setq ent (entget (setq en (ssname ss (setq cnt (1- cnt))))) cen (cdr (assoc 10 ent)) maj (cdr (assoc 11 ent)) mad (distance '(0.0 0.0 0.0) maj) ) (if (= (cdr (assoc 40 ent)) 1.0) (progn (command "._circle" "_non" cen mad) (entdel en) ) ) ) ) (princ) )
  23. hi Dadgad, -No there is no arrow grips and corners, center or anywhere on the dialog box, there is only scroll up and down arrows at the right end of window which is still alot of work to scroll one by one -I will try to learn how to use commands you suggested and will update. -i checked the profile tab under option and nothing show except it said <<Unnamed profile>>, Note: i opened the drawing on my co worker computer and the LAYER PROPERTY window show full screen as normal.
  24. Hi All, I'm working on a model and am wondering if it is possible to measure the length of a cord/ray in autocad? The geometry is attached below. I'd like to measure the length of a chord from the left to right boundaries, such that at an circle, the chord/ray travels the shortest path around the circle. Please see attached sketch of what i'd like to achieve (please excuse the crappy mouse drawing) as well as the dxf file. Thank you for your help. TheGoodGeometry.dxf
  25. Hello everyone. I wonder if there is a way to convert an ellipse to a circle with the help of autolisp. I have a DWG that contains some circles and ellipses in coordinate representation. But I have noticed that even when the minor radius is equal to the major radius (apparently a circle), the center coordinate that appears in the properties is not the same that I have inserted. So, I believe that if I change the ellipse to circle problem will be solved. Thank you in advance for your time and help. Have a nice day
  26. pkenewell

    Convert mleader to text

    @rkmcswain Thank you - I thought that it would gather all the new entities from the explode command without resetting the last entity. Wrong! Here's is a new solution: Tested on multiple MLEADERS. I had to change it to iterate through the selection set and explode 1 MLEADER at a time, get the new entities and delete them. (defun c:ML2TXT (/ en ss cnt) (if (and ; Mark the last entity in the drawing. (setq en (entlast)) ;; Select the Multileader(s) (setq ss (ssget '((0 . "MULTILEADER")))) ) (repeat (setq cnt (sslength ss)) ;; Get 1 MLEADER from the selection set. (setq en (ssname ss (setq cnt (1- cnt)))) ;; Explode the MLEADER (command "._explode" en) ;; Loop through the newly created entities. (while (setq en (entnext en)) ;; if a line, polyline or solid, delete it. (if (wcmatch (cdr (assoc 0 (entget en))) "*LINE,SOLID")(entdel en)) ) (setq en (entlast)) ) ) (princ) )
  27. rkmcswain

    Convert mleader to text

    I just tried it, on a selection set of 9 multileaders. It only operates on one of the 9 in the selection set.
  1. Load more activity
  • Newsletter

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