Jump to content

All Activity

This stream auto-updates

  1. Past hour
  2. Today
  3. PGia

    Hybrid parallel

    I’m sorry. I didn’t think this was important — but maybe I was wrong. I usually copy drawings from my PC to edit them on my smartphone. The app I use on my smartphone is DWG FastView. I don’t remember where I sent it from, but if that message appeared when opening it, it must be because I saved the drawing on my smartphone for some reason and sent it from there.
  4. Steven P

    Hybrid parallel

    I think Lee Mac had something to work out polyline direction, so should be able to check and reverse a polyline if necessary. Reverse back again after
  5. SLW210

    Hybrid parallel

    From what I have gathered, no easy task to do this, many GIS programs seem to struggle with pinpoint accuracy as well. The method for QGIS, is involved, so I didn't get time to run through it with the plugin, but I did dig into reddit and some GIS sites. Basically they do similar method, they just add a lot of points down the "polyline/line" and run the appropriate "centerline tool". Where someone posted results, I saw some in some of them the same "off center through some areas" as in the methods posted here. This was apparently plenty good enough for most GIS users, though I only did a relatively quick dig. In a similar method for AutoCAD, maybe adding more points to the polylines would help. I might have time Monday at home to check QGIS. Though I did import the OPs drawings into a session, the first one comes in very strange, the second seemed to be correct. The OP still hasn't answered why the second .dwg posted comes up as not an AutoCAD drawing. For AutoCAD, it helps if BOTH polylines go the same direction.
  6. My $0.05 does not check for off or frozen layers. (defun c:wow ( / ent co-ord ss) (if (tblsearch "layer" "Site") (princ) (command "-layer" "Make" "Site" "c" 1 "" "") ) (if (tblsearch "layer" "Exist") (princ) (command "-layer" "Make" "Exist" "c" 2 "" "") ) (command "chprop" "all" "" "la" "Site" "") (setq ent (car (entsel "\nPick the pline "))) (setq co-ord (mapcar 'cdr (vl-remove-if-not '(lambda (x) (= (car x) 10)) (entget ent)))) (setq ss (ssget "WP" Co-ord)) (command "chprop" ss "" "LA" "Exist" "") (princ) ) (c:wow)
  7. Yesterday
  8. mhupp

    Hybrid parallel

    I Created a closed polyline and offsetting in. the smaller the offset the more "detail" (points) you get but you need them to get the right vertex or you just cutting corners. I don't really know how to pick up those points and don't really want to offset 1cm and have a million points either. CPL offset.dxf
  9. see new code. make sure the layers names are correct. (defun c:chglyobjpl (/ acdoc p_list p_coord sset ent obj newLayerName newLayerName1 i) (vl-load-com) (setq acdoc (vla-get-ActiveDocument (vlax-get-acad-object))) (princ "\nSelect All Objects To Proccess") (setq ssall (ssget)) (setq p_list (entget (car (entsel "\nSelect the Polyline Boundery For ''exist'' Layer: ")))) (setq i 0) ;;;;;;;;;;;;;;;;;;;;;;;;;;;Change Objects To site Layer;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (if ssall (progn (sssetfirst nil nil) (setq newLayerName1 "site");;(getstring T "\nEnter new layer name: ")) (repeat (setq i (sslength ssall)) (setq i (1- i)) (setq ent (ssname ssall i)) (setq obj (vlax-ename->vla-object ent)) (vla-put-Layer obj newLayerName1) );;repeat (vla-Regen acdoc acAllViewports) (sssetfirst nil nil) );;progn (princ "\nNo objects found in the drawing.") );;if ;;;;;;;;;;;;;;;;;;;;;;;;;;;Change Objects To site Layer;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (setq ent nil) (setq obj nil) (setq i 0) ;;;;;;;;;;;https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/selection-set-using-existing-polygon/td-p/11307274 ;;;;;;;;;;;calderg1000 msg-7 (if (setq p_coord (mapcar 'cdr (vl-remove-if-not '(lambda (x) (= (car x) 10)) p_list) );;end setq p_coord );;end if condition (sssetfirst nil (setq sset (ssget "_wp" p_coord))) ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;Select Objects In polygon;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;Change Objects Layer;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (if sset (progn (sssetfirst nil nil) (setq newLayerName "exist");;(getstring T "\nEnter new layer name: ")) (repeat (setq i (sslength sset)) (setq i (1- i)) (setq ent (ssname sset i)) (setq obj (vlax-ename->vla-object ent)) (vla-put-Layer obj newLayerName) );;repeat (vla-Regen acdoc acAllViewports) (sssetfirst nil nil) );;progn (princ "\nNo objects found in the drawing.") );;if ;;;;;;;;;;;;;;;;;;;;;;;;;;;;Change Objects To exist Layer;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (sssetfirst nil nil) (princ) );;end defun test1.mp4
  10. Thanks ... but..... on running the program, its saying that "no objects found in the drawing" and the program closes
  11. I used the lisp called cookie cutter .. it worked like magic thank you SLW210
  12. Try this: (defun c:chglyobjpl (/ acdoc p_list p_coord sset ent obj newLayerName i) (vl-load-com) (setq acdoc (vla-get-ActiveDocument (vlax-get-acad-object))) ;;;;;;;;;;;https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/selection-set-using-existing-polygon/td-p/11307274 ;;;;;;;;;;;calderg1000 msg-7 (setq p_list (entget (car (entsel "\nSelect the LwPolyline: ")))) (if (setq p_coord (mapcar 'cdr (vl-remove-if-not '(lambda (x) (= (car x) 10)) p_list) );;end setq p_coord );;end if condition (sssetfirst nil (setq sset (ssget "_wp" p_coord))) ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;Select Objects In polygon;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;Change Objects Layer;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (if sset (progn (setq newLayerName "exist") ;;(getstring T "\nEnter new layer name: ")) (repeat (setq i (sslength sset)) (setq i (1- i)) (setq ent (ssname sset i)) (setq obj (vlax-ename->vla-object ent)) (vla-put-Layer obj newLayerName) );;repeat (vla-Regen acdoc acAllViewports) (sssetfirst nil nil) );;progn (princ "\nNo objects found in the drawing.") );;if ;;;;;;;;;;;;;;;;;;;;;;;;;;;;Change Objects Layer;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (princ) );;end defun
  13. If you want to have a go, look at Selection Sets to select everything within the polyline (see Lee Mac Selection sets page - it is rather good - ssget), window polygon or crossing polygon Do 2 selection sets - one for everything "_X" and one for Crossing Polygon, I think Lee Mac has a routine there to remove one selection set from another. This gives you 2 sets of entities to work with Loads of LISPs out there to change layers. Have a go, it is easier than you might think
  14. Hi, Is there a Lisp routine which can move all objects within a selected polyline to a layer called "exist" and all objects outside that same polyline to a layer called "site" ?? ignoring all frozen or OFF layers ?? Regards.
  15. Last week
  16. This is very much proof of concept, and needs some extra work but you can try it. I just did 162 layouts by selection did not try all 300+. You must use this new dwg as it has Layout1 set up correctly. I removed layout2 not needed. Obvious bug is if rectangs are not made in correct label sequence but can fix that if it happens. It uses creation order at moment. You should use 1 size for all the rectangs. ; https://www.cadtutor.net/forum/topic/98809-multiple-polyline-viewport-from-model-to-layout/ ; rectangs to layouts by AlanH ; Nov 2025 (defun rec2lays ( / ss ent txt ins pt2 pts ent2 co-ord mp ) (setvar 'ctab "Model") (setq ss (ssget (list (cons 0 "*TEXT") (cons 8 "SHEMA_NAME")(cons 410 "Model")))) (repeat (setq x (sslength ss)) (setq ent (entget (ssname ss (setq x (1- x))))) (setq txt (cdr (assoc 1 ent))) (setq ins (cdr (assoc 10 ent))) (setq pt2 (polar ins 5.4977 2.5)) (setq pts (list ins pt2)) (setq ent2 (ssname (ssget "F" pts (list (cons 0 "LWPOLYLINE")(cons 8 "SHEMA_RECT"))) 0)) (setq co-ord (mapcar 'cdr (vl-remove-if-not '(lambda (x) (= (car x) 10)) (entget ent2)))) (setq mp (mapcar '* (mapcar '+ (car co-ord) (caddr co-ord)) '(0.5 0.5))) (command "layout" "C" "Layout1" txt) (setvar 'ctab txt) (command "Mspace") (command "zoom" "c" mp 10) (command "zoom" "15XP") ; a custom scale of 15 seems to suit (command "Pspace") (setvar 'ctab "Model") ) (princ) ) sheme_JAS.dwg
  17. So... what you need to create is a top, front and side view as well as a sectional view in 2D. Have you done anything like that in the past?
  18. As suggested can be done you would look for the "Mx" value then find the co-ords of the rectang, make a layout and create a viewport. You need to provide a couple of things, it would be best to have 1 true size title block in say "Layout1" this would be copied repeatedly. If you dont use a title block ignore. Part 2 as already requested you need to set one size for the layouts. Say a A4 etc. The rectangs are different sizes you need to set the size to match the biggest rectang say M15 as example then a proper scale can be used for the viewport. The layouts are then consistent. So get something like this at a fixed scale.
  19. Steven P

    Text to polyline length

    Thanks, though it can be improved a bit too - I reckon the point of intersections would be better off on the lines between height points - tried that just now but got myhead going round in circles with a part of it. Will see what I can do for later
  20. PaulyPHI

    Text to polyline length

    @Steven P that works way better than i dreamed... even if you say its a bit dirty... Being able to select the intersection of datum and reference line, and the scaling option is brilliant.. If i had a box of Jaffa Cakes they would be in your hands right now.... Thank you soo much.... @BIGAL thank you for the reply and i think i understand what you mean... but i need to leave some work for my understudy to do can't speed him up too much.....
  21. GLAVCVS

    Hybrid parallel

    Yes. My "one/cross-eyed" son has quite a few limitations: he only sees reality from one point of view. But reality is best analyzed in "Stereo." For the same reason, I think we need to analyze both polylines in the same way and at the same time (using angle bisectors). I hope to have time to make progress on my "good approach" next weekend. Someone has "travelled very far" in experimenting with this type of calculation: @marko_ribar I think it would be very interesting to hear his opinion on this.
  22. Do you have a desired layout format (paper size), desired scale, etc. or you just want to display of each viewport from model space no matter the scale, paper size, etc.?
  23. Thank s for answer. Here is my case . In this drawing need to create 355 viewports in ONE layout paperspace. The rectangul of viewport is on layer "SHEMA_RECT". sheme_JAS.dwg
  24. BIGAL

    Blocks and library

    As I have said many times I use POP menus for block libraries, you can select internal or external blocks for insertion. Pop menus should be fine in LT even earlier versions.
  25. Yes like many others as suggetsed @aridzv I have something, and have made like 50+ in one go. You need to post a sample dwg to see how you are attempting to do this.
  26. BIGAL

    Text to polyline length

    If you break down the top surface and convert it into a single Pline, Then you can label every point into a cross section shape. You would need to say set the RL of the 1st point enter Hor and Ver scales if applicable. Draw a datum line then can put text below it. There is 2 levels at some points but that can be taken into account. So maybe post a few cleaned up version of the SINGLE plines.
  27. I have just created a load of blocks for future use, they where in the block panel, but have now disappeared? is thewre a tutorial for creating a block library. Using 2026LT
  28. have a look on this topic;
  29. Steven P

    Text to polyline length

    I think this is something that Civil3D covers - BigAl knows these things better than me though. This is a very quick and dirty LISP: Noting that your lines are 1000x longer than the reference texts, I have a multiplier (hit enter to just accept the 1000, you can change the code to suit) Select the reference polyline - I am assuming always a horizontal reference line as your example Select the point that the height texts refer to (is it the centre of the '+', in the drawing there is a point drawn at the correct height next to each text) and then the associated text. Repeat along the points Exit badly with the escape key. I am going to get abuse for cutting corners there... Slight difference to your example that my lines are drawn from the closest point on the polyline that you selected (defun c:test ( / Multiplier ReferencePoly ReferenceY EndLoop MyPoint MyHeight MyHt ClosestPoint) (defun MkLn ( pt1 pt2 Layer / Ln ) ;; Add in layer etc details (setq Ln (entmakex (list '(0 . "LINE") '(100 . "AcDbEntity") '(410 . "Model") '(62 . 0) '(100 . "AcDbLine") (cons 8 Layer) (cons 6 "CONTINUOUS") (cons 62 256) (cons 10 pt1) (cons 11 pt2) '(210 0.0 0.0 1.0) ))) ; end list, entmakex, setq ) (setq Multiplier (getreal "Enter Height Multiplier (1000)")) (if (or (= Multiplier nil)(= Multiplier "")(= Multiplier 0)) (setq Multiplier 1000) ) (setq ReferencePoly (car (entsel "Select Reference Polyline"))) (setq ReferenceY (cdr (assoc 10 (entget ReferencePoly)))) (setq EndLoop "No") (while (= EndLoop "No") (setq MyPoint (getpoint "Select Point")) (setq MyHeight (car (entsel "Select Height text"))) (setq MyHt (cdr (assoc 1 (entget MyHeight)))) (setq ClosestPoint (vlax-curve-getclosestpointto ReferencePoly MyPoint)) (MkLn ClosestPoint (mapcar '* '(1 1 0) (mapcar '+ (list 0 (* Multiplier (atof MyHt)) 0) ClosestPoint)) "0") ) )
  1. Load more activity
×
×
  • Create New...