Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 02/15/2021 in all areas

  1. Deleting all write-enabled dimensions (i.e. those residing on unlocked layers) from a drawing is relatively straightforward and can be achieved by iterating over the drawing database and deleting all objects whose objectname property matches "AcDb*Dimension*", as the following code demonstrates: (defun c:deldim ( ) (vlax-for blk (vla-get-blocks (vla-get-activedocument (vlax-get-acad-object))) (if (= :vlax-false (vla-get-isxref blk)) (vlax-for obj blk (if (and (wcmatch (vla-get-objectname obj) "AcDb*Dimension*") (vlax-write-enabled-p obj)) (vla-delete obj) ) ) ) ) (princ) ) (vl-load-com) (princ) The above will remove all dimensions from all layouts & block definitions. However, deleting MText containing specific words isn't quite so easy, as the MText content could potentially be interspersed with MText formatting codes, which would need to be removed prior to testing whether the content contains one of the target words.
    2 points
  2. I think that drawing an Xline with Polar Tracking is tricky until you know what you are looking out for. Drawing an ordinary line would be much easier. First of all, set up Polar Tracking by right clicking on the POLAR tab at the bottom of the screen and choose Settings. In the Polar Angle measurement, I use Relative to last segment. You can enter any Increment angle, but 45° is enough for me. Polar Tracking displays temporary alignment paths defined by the polar angles you specify. As you move the cursor, when you get to a specified angle, a small cross appears at the cursor and the alignment path extends beyond the cursor. When you see this alignment path, you can pick the length of your line or enter it at the keyboard. Drawing a Xline is more difficult because the Xline is on top of the alignment path and you can only see the cross at the cursor. Practice makes perfect, but when you can use it, Polar Tracking is most useful.
    1 point
  3. It is very short and concise with a special elegance. Only one command needs to be added, "regen". What more could I say, it's not for nothing that you are called a cad guru, you are fantastic, you are the greatest man, thank you very much Lee Mac.
    1 point
  4. Here's one possible way: (defun c:toglay ( ) (vlax-for lay (vla-get-layers (vla-get-activedocument (vlax-get-acad-object))) (foreach prp '(lock layeron freeze) (vl-catch-all-apply 'vlax-put (list lay prp (~ (vlax-get lay prp)))) ) ) (princ) ) (vl-load-com) (princ)
    1 point
  5. @fadysamy077@gmail.com I see that you are using AutoCAD LT. Unfortunately, the LT version does not support AutoLISP. If you have access to full AutoCAD, you can use this information to load the script:
    1 point
  6. WHM your turn now if having problems with formula post what you are using rather than some one post a solution then you learn.
    1 point
  7. Please post the code you have so far and the reference equations you are using for calculating the sag. The equations at this site seem to be straightforward although LISP make make them ugly. Start by calculating x1 and x2 then go on to sag. How do you determine the 1% sag limit with two poles each of different heights and potentially mounted at different elevations?
    1 point
×
×
  • Create New...