Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/13/2019 in all areas

  1. Reducing the number of operations performed by the sorting function will significantly improve the performance of the program, since the data used for the sort need only be extracted from each entity once, as opposed to for each comparison - as such, I would suggest the following: (defun c:sorttextbyx ( / e i l s x ) (if (setq s (ssget '((0 . "TEXT")))) (progn (repeat (setq i (sslength s)) (setq i (1- i) e (ssname s i) l (cons e l) x (cons (cadr (assoc 10 (entget e))) x) ) ) (foreach n (vl-sort-i x '<) ;; Do something with the sorted result - (princ (strcat "\nX-Coord: " (rtos (nth n x)) "\tContent: " (cdr (assoc 1 (entget (nth n l)))))) ) ) ) (princ) )
    1 point
  2. something like this? (defun sort-x ( / ss); left -> right (if (setq ss (ssget ":L" '((0 . "TEXT")))) (vl-sort (vl-remove-if 'listp (mapcar 'cadr (ssnamex ss))) (function (lambda (a b) (< (cadr (assoc 10 (entget a)))(cadr (assoc 10 (entget b))))))))) (defun sort-y ( / ss); up -> down (if (setq ss (ssget ":L" '((0 . "TEXT")))) (vl-sort (vl-remove-if 'listp (mapcar 'cadr (ssnamex ss))) (function (lambda (a b) (> (caddr (assoc 10 (entget a)))(caddr (assoc 10 (entget b))))))))) (defun c:t1 ( / i) (setq i 0) (mapcar '(lambda (x) (princ (strcat "\nX" (itoa (setq i (1+ i))) " = " (rtos (cadr (assoc 10 (entget x))) 2 2)))) (sort-x)) (princ) ) (defun c:t2 ( / i) (setq i 0) (mapcar '(lambda (x) (princ (strcat "\nY" (itoa (setq i (1+ i))) " = " (rtos (caddr (assoc 10 (entget x))) 2 2)))) (sort-y)) (princ) )
    1 point
  3. If you want to keep this in plain AutoCAD, do a little prepwork first. Create each pipe OD and ID and extrude it 1" to make a pup piece. Then, use a catalog like Weldbend to create your 90s and 45s, etc. Make blocks of each one, throw them on a Tool Palette. Utilize Dynamic UCS where you can. Place these items, and use the Grips to stretch the pipe solids, and connect the elbows as necessary. If you're going to this length though I would consider a piping package such as AutoCAD MEP. Made a quick and dirty video, hope this helps: https://www.screencast.com/t/YRBlq6BYz0W -TZ
    1 point
  4. Wow a big question. I have spent years trying to improve my ex team (I retired recently), a lot of it is seconds here and there, like CIV3D I stopped using Toolspace to change surface styles its was like 4 picks have a toobar now 1 pick. We had some guys that were guns others How many days ! We had a 3rd party add on made a lot of the stuff of road design much easier, CIV3D can be a big overhead. A few minutes spent ticking off cross sections not needed for sheet production compared to say an hour rearranging. We just know lots of little tricks. Design is on edge of road but construction want top of kerb levels so we cheat move design up 110mm plot long sections, move back plot crossections, or I have adjust levels in bulk so add 110mm to levels a few seconds fix. Its the little things that save time, we have a bubble lisp it just draws a circle and puts alpha or numeric in it, but increases for every bubble, old way copy and edit, its as fast as you can pick a point. 10 points say 5 seconds. The surveyors were having problems with trees, two items trunk and spread so did something for them, finds them and uses a dynamic block. One of my previous roles was Civil software support so learnt lots of solutions for various problems. Any way I think before we can help you need to tell us where you are struggling, I had a team of 8 so we would bounce solutions off each other, are there other engineers or just the boss ? Is your boss comparing you to some one else ? Go talk to them find out why they are quicker what tricks do they use. My biggest was 88 sheets one dwg 12 roads multi millions. So thinking about how to organise from day one helped so no editing/copying between sheets. Again have a lisp to put a revised design on the correct sheet.
    1 point
  5. You could also do something like this: (cond ((= (getvar 'cvport) 1) (alert "Code does not work in paperspace! Here we come modelspace! :)") (setvar 'tilemode 1) ) )
    1 point
×
×
  • Create New...