Jump to content

Leaderboard

  1. GLAVCVS

    GLAVCVS

    Community Member


    • Points

      7

    • Posts

      672


  2. Tharwat

    Tharwat

    Trusted Member


    • Points

      4

    • Posts

      7,382


  3. BIGAL

    BIGAL

    Trusted Member


    • Points

      2

    • Posts

      19,666


  4. ronjonp

    ronjonp

    Trusted Member


    • Points

      2

    • Posts

      2,524


Popular Content

Showing content with the highest reputation on 02/24/2025 in Posts

  1. https://www.lee-mac.com/unformatstring.html
    2 points
  2. If you want to change the name of the destination layer you just have to change the 'MyLayer' code to the name you want.
    1 point
  3. Maybe this will help you (defun c:trocapa (/ conj ent n) (setq n -1) (princ "\nSelect TEXTs/MTEXTs...") (if (setq conj (ssget '((0 . "*TEXT")))) (while (setq ent (ssname conj (setq n (1+ n)))) (entmod (append (entget ent) (list (cons 8 "MyLayer") (cons 62 256)))) ) ) (princ) )
    1 point
  4. Replace it with this (mapcar 'cdr (vl-remove-if-not '(lambda (x) (= (car x) 10)) (entget pline))))
    1 point
  5. But... Better thought, it's basically the same thing.
    1 point
  6. @Lee Mac Or another variation of your idea (defun c:myDimAlign (/ x e g p) (if (and (setq e (car (entsel "\nSelect any LWpolyline..."))) (= (cdr (assoc 0 (setq x (entget e)))) "LWPOLYLINE") ) (foreach g x (if (= (car g) 10) (if p (command "DIMALIGNED" p (setq p (cdr g)) "@5<180") (setq p (cdr g)) ) ) ) ) )
    1 point
  7. Here is my attempt with foreach function based on the request of the OP. (defun c:DimPly ( / sel 1st ) ;;--------------------------------------------;; ;; Author : Tharwat Al Choufi ;; ;; ;; ;; www.AutolispPrograms.WordPress.com ;; ;;--------------------------------------------;; (and (princ "\nSelect LWpolyline to dimension : ") (or (setq sel (ssget "_+.:S:E" '((0 . "LWPOLYLINE")))) (alert "Invalid object.! Try again") ) (foreach itm (entget (ssname sel 0)) (and (= (car itm) 10) (or (and 1st (or (command "_.DIMALIGNED" "_non" 1st "_non" (setq 1st (trans (cdr itm) 0 1)) "@0.35<180") t)) (setq 1st (trans (cdr itm) 0 1)) ) ) ) ) (princ) )
    1 point
  8. Only one DIMALIGNED call is required, e.g.: (defun c:mydimalign ( / e p x ) (if (and (setq e (car (entsel))) (= "LWPOLYLINE" (cdr (assoc 0 (setq x (entget e))))) ) (foreach g x (cond ( (/= 10 (car g))) ( p (command "_.dimaligned" p (setq p (cdr g)) "@5<180")) ( (setq p (cdr g))) ) ) ) (princ) )
    1 point
  9. Even though the codes should work but would draw them vertically.
    1 point
  10. Yeah you are right, I should have retrieved the coordinates excluding the GC 10. Codes updated.
    1 point
  11. No. I've already tried those options. However, when I checked your message and looked at the code again, I thought I saw that you forgot to remove the 10 code in the first 'foreach'. Maybe that's what it is and when drawing the 'dimensions' it does so at the coordinate x=10. For this reason I didn't see the command display anything on the screen. I'll check it when I get home
    1 point
  12. Nothing special in the codes, but if you are not using the English version then you may need to add the prefixed symbols _. to command name.
    1 point
  13. Just make the iteration skip ahead while pt1 and pt2 are not assigned (if (= (cdr (assoc 0 bm)) "LWPOLYLINE") ; Check if the entity type is LWPOLYLINE (progn (setq pline (cdr (assoc -1 bm))) (setq pdb (entget pline)) ; Get the entity list for the selected polyline. (foreach sublist pdb (if (= (car sublist) 10) ; Look for vertex points (coded as 10). (progn (if pt2 (setq pt1 pt2 pt2 (cdr sublist)) (if pt1 (setq pt2 (cdr sublist)) (setq pt1 (cdr sublist)) ) ) ;;; (setq p1 (cdr sublist)) ; Get the point coordinates. ;;; (setq p2 (cadr sublist)) ;;;(command "_.chprop" pline "" "_lw" "10.00" "") (if (and pt1 pt2) (command "DIMALIGNED" pt1 pt2 "@0.35<180") ; Create aligned dimension. ) ) ; end progn ) ; end if ) ; end foreach ) ; end progn )
    1 point
  14. Are they fields or attributes ? There is a big difference between the two. yes can update multiple blocks changing a single or more attributes across a dwg. If its fields then its more complicated Can you post a dwg ?
    1 point
  15. If your drawing stairs then why not use a Stair LIsp. There are plenty of examples out there just do a google, look for floor start pick point, end point floor above point. A lot of them have the rules of stair design built in. For me "The AS1657 standard provides dimensional “deemed to comply” requirements", there should be a standard for where you are in the world. Even here in Cadtutor look for "looking-for-lisp-draw-simple-stairs" you need to look for answers yourself.
    1 point
  16. Is this a company problem, a few people, just you? What exactly is AutoCAD doing when the drawing is loading? Does it slowly start showing objects or does it hang and suddenly load? Are the files on a local drive, network or in the cloud? Computer specifications? Has IT looked into this? Without knowing more details, sounds like an Anti-virus and/or firewall issue. There used to be issues with AutoCAD after the computer goes to sleep and needing a password to reopen, but I don't remember all the details. https://www.autodesk.com/support/technical/article/caas/sfdcarticles/sfdcarticles/Program-crashes-using-random-commands.html Scroll to Issues not related to a specific drawing, though you should read it all anyway.
    1 point
×
×
  • Create New...