All Activity
- Today
-
Steven P started following Dynamic variables
-
It mentions this in the help file that "Duplicate elements may be eliminated from the list."
-
Dimensions look correct, but lose their connection to geometry
SLW210 replied to indiancad's topic in AutoCAD Drawing Management & Output
There is a LISP around for that. It doesn't work on DIMDIA/DIMRAD, but can really speed up the work if it's an entire drawing. _dimreassociate, is there a quicker way to do an entire drawing? - AutoCAD 2D Drafting, Object Properties & Interface - AutoCAD Forums I have a few newer versions I have been working on to improve it that I don't think are ready for posting, but maybe I will get back at it soon. -
Nice one! I am surprised you had time in your 30 hour day to respond. I did get it to work on most objects in AutoCAD 2000i, I'll try to get it working better when I get a chance, I believe the issue is now mostly my AutoCAD 2026 drawings are showing proxy object warnings when I save them down to AutoCAD 2000 versions, so I might try redrawing the tests.
-
ugeticadtu joined the community
-
In 2026, I purchased Bentley ProSteel on the MicroStation platform. I haven't used it yet. I previously used another software package, but its annual subscription fees were excessively high. I decided to switch to ProSteel because it is available with a perpetual license, and its annual maintenance costs are relatively reasonable. I work independently and also need to use several other software packages, which come with additional costs. I haven't started learning ProSteel yet, so I was wondering if anyone could recommend any good-quality training materials, tutorials, or other resources that would help me learn how to use the software effectively. According to the reseller, I am apparently the only person in my country using ProSteel on the MicroStation platform. Tekla Structures and Advance Steel are much more popular here. However, both use subscription-based licensing models, which is why ProSteel became an attractive alternative for me.
-
secon joined the community
-
okay i just tested CABs version more throughly, it does get the correct amount of viewports, however it seems it does not correctly identify the paperspace viewport. From my testing on TrueViewports.dwg its exluding a wanted viewport and including the papserspace vp. I tested it by printing the object handles of the viewports and compared the handles manually. (defun c:test345 () (mapcar '(lambda (l) (list (car l) (mapcar '(lambda (e) (cdr (assoc 5 (entget e)))) (cadr l)))) (cab_foo nil)) ) (defun cab_foo (on? / get_exc ss result vpl tab exc tmp) ;; Only get vps that are ON if flag is true (defun get_exc (vpe / a b c) (and (setq a (cdr (assoc 330 (entget vpe)))) (setq b (cdr (assoc 340 (entget a)))) (setq c (cdr (assoc 331 (entget b)))) ) c ) (if (setq ss (ssget "x" '((0 . "VIEWPORT")))) (progn (setq vpl (mapcar 'cadr (ssnamex ss))) (setq vpl (mapcar '(lambda (x) (cons x (cdr (assoc 410 (entget x))))) vpl)) (setq vpl (vl-sort vpl '(lambda (e1 e2) (< (cdr e1) (cdr e2))))) (foreach vp vpl (cond ((null tab) (setq tab (cdr vp) exc (get_exc (car vp)) ) ) ((= tab (cdr vp)) (if (and (not (= exc (car vp))) (or (not on?) (zerop (logand 131072 (cdr (assoc 90 (entget (car vp)))))))) (setq tmp (cons (car vp) tmp)) ) ) (t (setq exc (get_exc (car vp)) result (if result (cons (list tab tmp) result) (list (list tab tmp)) ) tab (cdr vp) tmp nil ) ) ) ) (if tmp (setq result (if result (cons (list tab tmp) result) (list (list tab tmp)) ) ) ) ) ) result ) (defun c:gethandle () ;gets the handle of the currently activated viewport (and (not acet-currentviewport-ename) (= (load "acetutil.fas" "fail") "fail") (princ "\nError: couldnt load acetutil.fas") ) (cdr (assoc 5 (entget (acet-currentviewport-ename)))) ) test345 gives me: (("Layout2" ("245" "249" "24E" "263")) ("Layout1" ("233" "238"))) The correct handles would be: Layout1: "259", "238" Layout2: "24E", "263", "249", "268" so maybe the only reliable option is to initialize each layout and look for code 69
-
Spot on. For anyone starting out, realizing just how much AutoCAD handles- from initial layouts to final fabrication docs - is a real eye-opener. Thanks for sharing!
-
i think this is the thread with CABs code. https://www.theswamp.org/index.php?topic=10992.0
-
MESHSMOOTH: Controlling unwanted distortion when refining a 3D mesh
Alex Brikulsky replied to indiancad's topic in AutoCAD 3D Modelling & Rendering
Great question! This is a classic challenge when working with meshes in AutoCAD. When you increase the smoothness level globally, it acts like a blanket smoothing filter and ruins hard edges. To keep sharp features intact, here are a few approaches depending on the model: Creasing Edges (MESHSMOOTHCREASE): Before increasing smoothness, you can apply creases to specific edges or vertices. This tells AutoCAD to hold those edges sharp even at higher subdivision levels. Selective Refinement: Instead of cranking up the global smoothness for the whole object, try refining only specific faces or sub-objects where smooth transitions are actually needed, leaving critical mechanical features alone. Hybrid Modeling: If precise dimensions and sharp intersections are critical (like for manufacturing components), I usually avoid heavy mesh editing and stick to solid modeling, or convert the final clean shape back to solids using CONVTOSOLID once the organic parts are done. How complex is the geometry you're working on? Are you dealing with mechanical parts or more of an architectural/organic shape?- 1 reply
-
- 1
-
-
Alex Brikulsky changed their profile photo -
EnM4st3r started following Selecting viewport in a lisp
-
i cannot replicate this. When i first open TrueViewports.dwg "Layout2" is already initialized. Without initializing "Layout1" Running (sslength (ssget "_X" '((0 . "VIEWPORT") (67 . 1) (-4 . "/=") (69 . 1)))) -> i get 7 But running (length (rjp-getvports)) -> i get 6 so at least for me on this test drawing file @ronjonps code seems to work without initializing the layouts.
-
Fahmi joined the community
-
When should you use a CAD block instead of a group?
indiancad posted a topic in AutoCAD Drawing Management & Output
In large 2D drawings, similar objects such as symbols, equipment layouts, and standard details are often repeated several times. Using blocks makes it possible to update all instances from a single definition, while groups allow objects to be selected and handled together without creating a reusable block definition. Choosing the wrong approach can make later editing and drawing maintenance more difficult. When managing repeated geometry in production drawings, do you prefer blocks or groups? What factors influence your choice? -
Even a well-prepared CAD drawing can produce unexpected results when converted into a PDF or printed. Different settings and drafting practices can affect the final output. In your experience, what causes the most plotting problems? -
A drawing may look properly organized with different lineweights assigned to layers, but the final PDF or printed output can look completely different. Some lines appear too thick, while others become difficult to distinguish. One possible cause is a mismatch between layer lineweight settings and CTB/STB plot style configurations. The PLOT settings and selected plot style table can override the appearance you expect. When your plotted output doesn't match the drawing display, what do you check first: layer properties, CTB/STB settings, or plot configuration? Have you encountered any less obvious causes? -
How do you verify the accuracy of a 3D model before creating production drawings?
indiancad replied to indiancad's topic in AutoCAD 3D Modelling & Rendering
I agree. A 3D model can help verify the geometry, but a fully dimensioned 2D drawing is still important for manufacturing. Sections and profiles also make it easier to check critical areas, especially on complex parts. I think the right approach depends on how the part will be manufactured and what information the production team needs. -
Fitting without collision
Discus84 posted a topic in AutoCAD 2D Drafting, Object Properties & Interface
HI, The yellow line is wall, red is a box. I would like to know if the box fits by turning and sliding into opening. I put it into a circle as a bounding box and manually moved it around to check. There must be a more elegant way of doing this and mabe a way to calculate the max height of such box knowing its width and the wall depth with header height. Thanks! - Yesterday
-
FYI, Your code works fine in your sample dwg because as you loop through each layout the space is already set in pspace. But the code fails when it encounters a layout with a vport set in mspace. The following revised loop segment code accommodates for this: (vl-catch-all-apply '(lambda () (foreach lay (layoutlist) (setvar "CTAB" lay) ; (setvar "CVPORT" 1) ; this will error out if in mspace (setq cvport (getvar "cvport")) ; save current psace vport # (if (> 1 cvport) ; chk if in mspace (progn ; then (vl-cmdf "_.Pspace" "_.ZOOM" "_E" "_.Mspace") ; goto pspace then zoom extent and return to mspace (setvar "cvport" cvport) ; return to mspace of original vport # ) (vl-cmdf "_.ZOOM" "_E") ; else just zoom extent in pspace ) ; if ) ; foreach ) ; lambda
-
Like @SLW210 I had a move the title block in layouts to 0,0 and then zoom extents, had one user that would move the title block as it was the way he liked to draft. We had auto plot layouts so was part of our company standard to have title at 0,0.
-
@PGia there are other ways to sort lists other than inbuilt Vl-sort. You can use a Lisp version of Bubble sort and other sort algorithms. I sort up to 5 items deep in a list and as far as I can tell none are lost. Yes have seen that with some lists using VL-sort. So you can sort on say X & Y. ; sorts on 1st two items (vl-sort lst '(lambda (a b) (cond ((< (car a) (car b))) ((= (car a) (car b)) (< (cadr a) (cadr b))) ) ) )
-
@DavidP @mhupp as they say...there's more than one way to skin a cat... either with 67 or 410 or go crazy and do both 67 & 410...but the result is the same: vports from Model are filtered out
-
rlx started following Center mark replacement
-
sure : (alert "Press ok to start your 30hr day") anything else I can do for you?
-
@Danielm103 Interesting. I didn't know about those functions or that a parallel namespace existed. I'll look into that. Maybe it will minimize the drawbacks of using dynamic variables. @BIGAL Suppose we're dealing with elements that are scattered over a large area and you need to sort only a part of them and get a list. It might seem that the vl-sort function could be useful for this; however, it has a drawback: sometimes it deletes repeated elements from the list based on the filters. So I'm trying to do it without using vl-sort. Note: There are some objects that match exactly in location with others. @mhupp: Dictionary? What dictionary?
-
Dossierz joined the community
- Last week
-
Danielm103 started following Dynamic variables
-
AutoCAD session, you need to use vl-bb-set vl-bb-ref right?
-
Dimensions look correct, but lose their connection to geometry
indiancad posted a topic in AutoCAD Drawing Management & Output
In complex 2D drawings, dimensions can sometimes become disassociated after geometry is moved, copied, or modified. They may still display the correct measurement, but no longer update when the object changes. AutoCAD's DIMREASSOCIATE command can reconnect dimensions to the intended geometry. How do you handle disassociated dimensions in large drawings? Do you use DIMREASSOCIATE regularly, or do you prefer to recreate dimensions when their references are lost? -
I get that @PGia but it almost be harder to recall the correct random variable. associated list might not be what you need with the large data set your working with. as assoc looks at all 20000 records every time. look into Dictionary before going the other route. alot faster searching because you can only have unique keys tho that might be a deal breaker for you.
-
There may be ways to speed up using a list of 20,000 points, the first is if your points are numbered then make the list that way you have to but pt number 0 as 1st item then a (nth x lst) is a simple task and does not need the (- x 1). Re find a point depending how the list is made there is a way of quickly finding the point based on a sorted list a 10,000 list takes 13 tries to find the correct answer, it uses a 1/2 algorithm, look at 5000 item is it before or after look at say 2500 is it before or after so very fast. Can you explain what it is your doing and maybe some people here can provide faster code. I know something I did took 34 minutes 1st go, it now takes 2 minutes including user input.
-
@mhupp: in principle, my goal is to make a comparison between processing speed when the information to be looked up is stored in a very large list versus when it is stored in variables. I suppose that, as Lee or Pkenewell say, it is risky. But I think that if atoms-family allows complete control of AutoCAD's symbol table, it is worth trying to test this coding method.
