Jump to content

Search the Community

Showing results for tags 'polyline'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • CADTutor
    • News, Announcements & FAQ
    • Feedback
  • AutoCAD
    • AutoCAD Beginners' Area
    • AutoCAD 2D Drafting, Object Properties & Interface
    • AutoCAD Drawing Management & Output
    • AutoCAD 3D Modelling & Rendering
    • AutoCAD Vertical Products
    • AutoCAD LT
    • CAD Management
    • AutoCAD Bugs, Error Messages & Quirks
    • AutoCAD General
    • AutoCAD Blogs
  • AutoCAD Customization
    • The CUI, Hatches, Linetypes, Scripts & Macros
    • AutoLISP, Visual LISP & DCL
    • .NET, ObjectARX & VBA
    • Application Beta Testing
    • Application Archive
  • Other Autodesk Products
    • Autodesk 3ds Max
    • Autodesk Revit
    • Autodesk Inventor
    • Autodesk Software General
  • Other CAD Products
    • BricsCAD
    • SketchUp
    • Rhino
    • SolidWorks
    • MicroStation
    • Design Software
    • Catch All
  • Resources
    • Tutorials & Tips'n'Tricks
    • AutoCAD Museum
    • Blocks, Images, Models & Materials
    • Useful Links
  • Community
    • Introduce Yourself
    • Showcase
    • Work In Progress
    • Jobs & Training
    • Chat
    • Competitions

Categories

  • Programs and Scripts
  • 2D AutoCAD Blocks
  • 3D AutoCAD Blocks
  • Images
    • Backgrounds

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

  1. Hopefully I am just unaware of a setting or method for doing this but so far the field command is handy but missing something. Associative updates. When a polyline is drawn and used for calculating the area the field command does a quick job of extracting that info into a field text element. Problem is when that polyline boundary is changed the "field text" that was established previously does not update. Is this even possible or am I S.O.L.?
  2. this lisp convert polyline segments to arcs . work one line for time . i need select 1000 polylines for times. I'm new in autolisp and i do know what change in the code : (defun c:lwsegs2arced ( / massoclst nthmassocsubst v^v unit _ilp doc lw enx gr enxb p1 p2 p3 b i n ) (vl-load-com) (defun massoclst ( key lst ) (if (assoc key lst) (cons (assoc key lst) (massoclst key (cdr (member (assoc key lst) lst))))) ) (defun nthmassocsubst ( n key value lst / k slst p j plst m tst pslst ) (setq k (length (setq slst (member (assoc key lst) lst)))) (setq p (- (length lst) k)) (setq j -1) (repeat p (setq plst (cons (nth (setq j (1+ j)) lst) plst)) ) (setq plst (reverse plst)) (setq j -1) (setq m -1) (repeat k (setq j (1+ j)) (if (equal (assoc key (member (nth j slst) slst)) (nth j slst) 1e-6) (setq m (1+ m)) ) (if (and (not tst) (= n m)) (setq pslst (cons (cons key value) pslst) tst t) (setq pslst (cons (nth j slst) pslst)) ) ) (setq pslst (reverse pslst)) (append plst pslst) ) (defun v^v ( u v ) (mapcar '(lambda ( s1 s2 a b ) (+ ((eval s1) (* (nth a u) (nth b v))) ((eval s2) (* (nth a v) (nth b u))))) '(+ - +) '(- + -) '(1 0 0) '(2 2 1)) ) (defun unit ( v ) (mapcar '(lambda ( x ) (/ x (distance '(0.0 0.0 0.0) v))) v) ) (defun _ilp ( p1 p2 o nor / p1p p2p op tp pp p ) (if (not (equal (v^v nor (unit (mapcar '- p2 p1))) '(0.0 0.0 0.0) 1e-7)) (progn (setq p1p (trans p1 0 (v^v nor (unit (mapcar '- p2 p1)))) p2p (trans p2 0 (v^v nor (unit (mapcar '- p2 p1)))) op (trans o 0 (v^v nor (unit (mapcar '- p2 p1)))) op (list (car op) (cadr op) (caddr p1p)) tp (polar op (+ (* 0.5 pi) (angle '(0.0 0.0 0.0) (trans nor 0 (v^v nor (unit (mapcar '- p2 p1)))))) 1.0) ) (if (inters p1p p2p op tp nil) (progn (setq p (trans (inters p1p p2p op tp nil) (v^v nor (unit (mapcar '- p2 p1))) 0)) p ) nil ) ) (progn (setq pp (list (car (trans p1 0 nor)) (cadr (trans p1 0 nor)) (caddr (trans o 0 nor)))) (setq p (trans pp nor 0)) p ) ) ) (or doc (setq doc (vla-get-ActiveDocument (vlax-get-acad-object)))) (vla-startundomark doc) (if (and (setq lw (entsel "\nPick LWPOLYLINE...")) (= (cdr (assoc 0 (setq enx (entget (car lw))))) "LWPOLYLINE") ) (progn (setq i (fix (vlax-curve-getParamAtPoint (car lw) (vlax-curve-getClosestPointToProjection (car lw) (trans (cadr lw) 1 0) '(0.0 0.0 1.0)) ) ;_ vlax-curve-getParamAtPoint ) ;_ fix p1 (vlax-curve-getPointAtParam (car lw) i) p3 (vlax-curve-getPointAtParam (car lw) (1+ i)) lw (car lw) ) (setq enxb (massoclst 42 enx)) (while (= 5 (car (setq gr (grread t)))) (setq p2 (_ilp (trans (cadr gr) 1 0) (mapcar '+ (trans (cadr gr) 1 0) '(0.0 0.0 1.0)) p1 (cdr (assoc 210 (entget lw))))) (setq b ((lambda (a) (/ (sin a) (cos a))) (/ (- (angle (trans p2 0 lw) (trans p3 0 lw)) (angle (trans p1 0 lw) (trans p2 0 lw))) 2.0) ) ) (setq n -1) (foreach dxf42 enxb (setq n (1+ n)) (if (= n i) (setq enx (nthmassocsubst n 42 b enx)) (setq enx (nthmassocsubst n 42 (+ (cdr dxf42) b) enx)) ) ) (entupd (cdr (assoc -1 (entmod enx)))) ) ) (prompt "\n Nothing selected or picked object not a LWPOLYLINE ") ) (vla-endundomark doc) (princ) )
  3. Sample.dwg Hi all, I want to write a program which will export the coordinates of vertices for selected polylines with Object Data which corresponds to each polyline. Please refer to a sample drawing attached with this thread. I am happy with this program to export coordinates ; ---------------------------------------------------------------------- ; (Export LWPOLYLINE Vertices & Points to File) ; Copyright (C) 2000 DotSoft, All Rights Reserved ; Website: http://www.dotsoft.com ; ---------------------------------------------------------------------- ; DISCLAIMER: DotSoft Disclaims any and all liability for any damages ; arising out of the use or operation, or inability to use the software. ; FURTHERMORE, User agrees to hold DotSoft harmless from such claims. ; DotSoft makes no warranty, either expressed or implied, as to the ; fitness of this product for a particular purpose. All materials are ; to be considered ‘as-is’, and use of this software should be ; considered as AT YOUR OWN RISK. ; ---------------------------------------------------------------------- ;;Revised 8/23/07 CAB to report coordinates in current UCS (defun c:ptexport () (setq sset (ssget '((-4 . "<OR")(0 . "POINT") (0 . "LWPOLYLINE")(-4 . "OR>")))) (if sset (progn (setq itm 0 num (sslength sset)) (setq fn (getfiled "Point Export File" "" "txt" 1)) (if (/= fn nil) (progn (setq fh (open fn "w")) (while (< itm num) (setq hnd (ssname sset itm)) (setq ent (entget hnd)) (setq obj (cdr (assoc 0 ent))) (cond ((= obj "POINT") (setq pnt (cdr (assoc 10 ent))) (setq pnt (trans pnt 0 1));;**CAB (princ (strcat (rtos (car pnt) 2 "," (rtos (cadr pnt) 2 "," (rtos (caddr pnt) 2 ) fh) (princ "\n" fh) ) ((= obj "LWPOLYLINE") (if (= (cdr (assoc 38 ent)) nil) (setq elv 0.0) (setq elv (cdr (assoc 38 ent))) ) (foreach rec ent (if (= (car rec) 10) (progn (setq pnt (cdr rec)) (setq pnt (trans pnt 0 1));;**CAB (princ (strcat (rtos (car pnt) 2 "," (rtos (cadr pnt) 2 "," (rtos elv 2 ) fh) (princ "\n" fh) ) ) ) ) (t nil) ) (setq itm (1+ itm)) ) (close fh) ) ) ) ) (princ) ) (princ "\nPoint Export loaded, type PTEXPORT to run.") (princ) Now I want to add Object data such as: 1. For polylines on 'LVCable' layer - CSAMetric, Conductor, FeederNo, NoOfCores 2. For polylines on other layers - CSABlue, CSANeutral, CSARed, CSAYellow, FeederNo Thank you Best wishes, Jes G Sample.dwg
  4. sample_MPoly2.dwg Hi all, I have six polylines, one of them is closed. I need to create vertices on a closed polyline. The sample drawing is attached. The vertex coordinates to be created are the coordinates of first vertex of other polylines. So far I only managed to store the coordinate of starting vertex of one polyline. (vl-load-com) (setq s1 (car (entsel))) (setq pl (vlax-ename->vla-object s1)) (defun vlax-list->2D-point (lst) (if lst (cons (list (car lst) (cadr lst)) (vlax-list->2D-point (cddr lst))))) (setq vertCoord(vlax-list->2D-point (vlax-get pl 'Coordinates))) (setq vertStart (car vertCoord)) Appreciate your help. Thank you
  5. Hi all, I am trying to write a LISP routine to list all the vertices of selected MPolygon. I have one MPolygon and 5 polylines. The sample drawing is attached. Basically, I want the program to create vertices on the MPolygon where the polylines touch the MPolygon (meaning there is no gap between them) and store the coordinates of all the vertices into a variable. Thank you Best wishes, Jes G sample_MPoly.dwg
  6. Hi all, I found this LISP routine by Tony Hotchkiss from here. If I understood this correct, it works with LWPolyline, Polyline and Point. For some reason it does not work will all polylines on my drawing. The sample drawing is provided below and attached with this thread https://drive.google.com/file/d/1bLurrxbnH6c9Fee5L4qIc0okwdVU0b9W/view?usp=sharing (defun vert (/ filterlist vla-obj-list lwlist 2dlist ptlist vlist1 vlist2 vlist3 ) (vl-load-com) (setq filterlist (make-filter) vla-obj-list (get-objects filterlist) lwlist (nth 0 vla-obj-list) 2dlist (nth 1 vla-obj-list) ptlist (nth 2 vla-obj-list) vlist1 nil vlist2 nil vlist3 nil ) ;_ end-of setq (if lwlist (setq vlist1 (make-list lwlist 2)) ) ;_ end of if (if 2dlist (setq vlist2 (make-list 2dlist 3)) ) ;_ end of if (if ptlist (setq vlist3 (make-list ptlist 3)) ) ;_ end of if (write-text vlist1 vlist2 vlist3) (princ) ) ;_ end of vert (defun make-list (p-list n / i vlist obj coords ca j x y z xy) (setq i (- 1) vlist nil ) ;_ end of setq (repeat (length p-list) (setq obj (nth (setq i (1+ i)) p-list) coords (vlax-get-property obj "coordinates") ca (vlax-variant-value coords) j (- 1) ) ;_ end-of setq (repeat (/ (length (vlax-safearray->list ca)) n) (setq x (vlax-safearray-get-element ca (setq j (1+ j)))) (setq y (vlax-safearray-get-element ca (setq j (1+ j)))) (if (= n 2) (setq xy (list x y)) (progn (setq z (vlax-safearray-get-element ca (setq j (1+ j)))) (setq xy (list x y z)) ) ;_ end of progn ) ;_ end of if (setq vlist (append vlist (list xy))) ) ;_ end-of repeat ) ;_ end-of repeat ) ;_ end-of make-list (defun make-filter (/ filter) (setq filter '((-4 . "<OR") (0 . "LWPOLYLINE") (0 . "POLYLINE") (0 . "POINT") (-4 . "OR>") ) ) ;_ end of setq ) ;_ end of make-filter (defun get-objects (filter / ss k lwp-list 2dp-list pt-list no-ent obj pl 2d pt ) (setq no-ent 1) (while no-ent (setq ss (ssget filter) k (- 1) lwp-list nil 2dp-list nil pt-list nil obj nil pl "AcDbPolyline" 2d "AcDb2dPolyline" pt "AcDbPoint" ) ;_ end-of setq (if ss (progn (setq no-ent nil) (repeat (sslength ss) (setq ent (ssname ss (setq k (1+ k))) obj (vlax-ename->vla-object ent) ) ;_ end-of setq (cond ((= (vlax-get-property obj "ObjectName") pl) (setq lwp-list (append lwp-list (list obj))) ) ((= (vlax-get-property obj "ObjectName") 2d) (setq 2dp-list (append 2dp-list (list obj))) ) ((= (vlax-get-property obj "ObjectName") pt) (setq pt-list (append pt-list (list obj))) ) ) ;_ end-of cond ) ;_ end-of repeat ) ;_ end-of progn (prompt "\nNo polylines or points selected, try again.") ) ;_ end-of if ) ;_ end-of while (list lwp-list 2dp-list pt-list) ) ;_ end-of get-objects (defun write-text (vl1 vl2 vl3) (setq fn (getfiled "Text File" "" "txt" 1)) (setq f (close (open fn "w"))) (setq msg "Points from LW-Polylines") (do-points fn vl1 msg 2) (setq msg "Points from 2d-Polylines") (do-points fn vl2 msg 3) (setq msg "Points from Point entities") (do-points fn vl3 msg 3) (princ) ) ;_ end of write-text (defun do-points (fn vl msg n) (setq f (open fn "a")) (write-line msg f) (write-line " x, y, z" f) (write-line "" f) (foreach point vl (setq x (nth 0 point) y (nth 1 point) ) ;_ end of setq (if (= n 2) (setq str (strcat (rtos x) "," (rtos y))) (progn (setq z (nth 2 point)) (setq str (strcat (rtos x) "," (rtos y) "," (rtos z))) ) ;_ end of progn ) ;_ end of if (write-line str f) ) ;_ end of foreach (setq f (close f)) (princ) ) ;_ end of defun (defun c:pts () (vert) (princ) ) ;_ end-of defun (prompt "PLIST.LSP by Tony Hotchkiss - enter PTS to start ") I am new in AutoLISP so I would appreciate if you could suggest me how this code can be modified to export all the coordinates of polylines for my sample drawing. Or maybe my drawing can be modified using another LISP routine. In addition, I want the program to output two files. The first file would be the XY coordinates of all points of the polylines with number (kind of identification). For example, The second file would include the points and distances between them. For example, Thank you Best wishes, Jes G Sample.dwg
  7. Hello, there, I am trying to find a LISP routine which will find the closest point on a polyline from a selected block reference. This routine finds the closest distance between two objects by selecting both objects, but it does not seem to work with block reference. After it finds the closest point, how to create a new vertex on that point? Thank you in advance Best wishes, Jes G
  8. Hello everyone. This is my first time posting but i have enjoyed a lot of your great work. I use a lot a field about object/polyline/length - decimal 0 (copy it to different polylines and than get their lenghth) and i am tired of changing object from dialogbox. Is there an easy way (lisp or other) to change the object directly and get its length:):)
  9. Hello there, Merry Christmas! I am new in LISP and I don't know where to start from. For clarity, please refer to the snapshot provided. I am not quite familiar with AutoCAD terminology though, but I'll try to explain my problem clear. Basically, we have polylines and points having their coordinates (these small blue rectangulars). What we need to do is: Find the closest on the polyline from the "blue rectangular" Create the vertex on THAT point Export to Excel files the following parameters: number, Coordinates of each vertex, distances between them, '1' if the line contains newly-created vertex The output files are expected to look like: 1. XY_Coords.xls: Node X Y 1 359.898 163.788 2 358.514 164.124 3 358.423 164.131 4 358.354 164.119 5 358.26 164.07 6 358.198 164.005 7 358.153 163.91 8 355.136 152.963 9 354.962 152.691 2. Lines.xls NodeA NodeB Distance Load 1 2 1.424202233 0 2 3 0.091268834 0 3 4 0.070035705 1 4 5 0.106004717 0 5 6 0.089827613 0 6 7 0.10511898 0 7 8 11.35513531 1 8 9 0.322893171 0 9 10 0.22220036 0 10 11 0.299247389 0 Please ask questions if you need some clarifications. Your help is greatly appreciated. Thank you Best wishes, Jes G https://ibb.co/mgpUaR
  10. (Here is a link to the original post I am referencing) Hi Guys, I found this awesome lisp by Renderman/Black Box and I have run it a few times and it worked great those times. Then I tried to run it to convert maybe 20 wipeouts at once and a bunch of them disappeared. I would really like to be able to use this one time once I finish drawing all the wipeouts and not after everyone, but I also don't want to risk some failing to convert and having to redraw a bunch of them. Does anyone see anything that would cause these errors? ;;;--------------------------------------------------------------------; ;;; c:WIPEOUT->REGION ;;; Courtesy of RenderMan, CADTutor.net ;;;--------------------------------------------------------------------; ;;; Description: ;;; Convert all wipeouts within a given drawing to regions. ;;;--------------------------------------------------------------------; ;;; Exit function: (defun WIPEOUT->REGION:Exit (msg) (cond ((not msg)) ; Normal exit ((member msg '("Function cancelled" "quit / exit abort"))) ; <esc> or (quit) ((princ (strcat "\n <!> Error: " msg " <!> ")))) ; Fatal error, display it (WIPEOUT->REGION:Quit)) ;;;--------------------------------------------------------------------; ;;; Quit function: (defun WIPEOUT->REGION:Quit () (setvar 'cmdecho *oldCmdecho*) (setq *oldCmdecho* nil) (setq *error* *oldError* *oldError* nil) (vla-endundomark *activeDoc*) (princ)) ;;;--------------------------------------------------------------------; ;;; Main function: (defun c:WIPEOUT->REGION (/ ss) (vl-load-com) (vla-startundomark (cond (*activeDoc*) ((setq *activeDoc* (vla-get-activedocument (vlax-get-acad-object)))))) ;; Error checking (setq *oldError* *error* *error* WIPEOUT->REGION:Exit) (setq *oldCmdecho* (getvar 'cmdecho)) (setvar 'cmdecho 0) ;; Main code (if (and (setq ss (ssget "_x" '((0 . "WIPEOUT")))) (setq ss (ssget "_x"))) ((lambda (i / e v visList wipList mn mx c) (while (setq e (ssname ss (setq i (1+ i)))) (if (/= "WIPEOUT" (strcase (cdr (assoc 0 (entget e))))) (progn (vla-put-visible (setq v (vlax-ename->vla-object e)) :vlax-false) (setq visList (cons v visList))) (setq wipList (cons e wipList)))) (foreach w wipList (vla-getboundingbox (setq v (vlax-ename->vla-object w)) 'mn 'mx) (setq c (mapcar '* (mapcar '+ (setq mn (vlax-safearray->list mn)) (setq mx (vlax-safearray->list mx))) '(0.5 0.5 0.5))) (vl-cmdf "._boundary" c "") (vl-cmdf "._matchprop" w (entlast) "") (vl-cmdf "._region" "") (vla-delete v)) (foreach o visList (vla-put-visible o :vlax-true))) -1) (prompt "\n <!> No Wipeouts Detected in Currect Drawing <!> ")) (WIPEOUT->REGION:Quit))
  11. I am hoping this will be a simple fix, but searching for the answer has turned up nothing. If I offset a self-intersecting polyline, it trims the offset anywhere that it crosses the original polyline. I am looking for a way for the offset to continue through self intersections untrimmed. My hope is that the self-trimming is a "feature", and that there is a way to turn it off, perhaps through a system variable or something. If not, the only way I can think to fix it is to write my own custom offset which doesn't sound very efficient. ps. Although I'm posting this in the general autocad area, I'm open to solutions that require autolisp. The reason I'm looking for this answer is to be used in an automated routine once I get past this hurdle. ***edit*** I found this thread , but it doesn't give a solution (aside from "use an ancient version on AutoCAD").
  12. Dear folks, There is an idea to get things easier in my workflow but I need check if it is possible or not. There are over 100 closed polyline objects on the model and each has a unique ID written in its Hyperlink value (like X_D_YYYY) And each of these polylines has a block placed in the enclosing area with an attribute. My aim is to get the Hyperlink from enclosing polyline and populate the block attribute with that value. You may find an example as DWG at the attachment. Regards. get-Enclosing-polyline-data.dwg
  13. ElCidCampeador

    Recognize multi-object shape

    Hi, I converted a pdf file into dwg. In this new file a point has become a group of 2D polyline and not a sigle entity. This conversion is necessary because I have to work in autocad. My problem is that I have to search in this dwg all of this "points" and write a text next to. Is possible to write a VBA program for autocad able to do this? If the point was a single point, it wouldn't be a problem, but in this case...I dont' know!
  14. Hello, I'm using Lee Mac cad lisp program "PolyInfo V 1.3." for exporting polylines vertex coordinates. But for full work joy I need some modifications. URL for program: http://www.lee-mac.com/polyinfo.html URL for code: http://www.lee-mac.com/lisp/html/PolyInfoV1-3.html As you saw the program exports a lot of information about the polyline. So i want to modify the code that will export just polyline start vertex points x and y coords in two columns ( my cad version information exports to txt file ). The result should look like this: ________________________________ Polyline starts points x 649542.45 649542.35 649542.28 Polyline starts points y 495232.54 495232.23 495232.41 ________________________________ Can someone help to figure out which part of code I must to modify to get the result i want? Please.
  15. So I'm having an issue joining some polylines I have in order to make a dimer shape (two circles meeting at one point, with two lines connecting them). I started by making the circles, followed by two lines extending from circle to circle. I then trimmed the lines to get the attached geometry. However, I cannot join the shape, and was wondering how this could be done. Thanks! Dimer_Help.dwg
  16. While running in Line command I'm able to snap along the way, snap my running line to itself at each sub prompt: "Specify next point or..." When I try this with the Polyline command, while running polyline at each sub prompt: "Specify next point or..." no snap can be acknowledged. My Polyline won't snap to itself while running toward successive points. All Object Snaps are checked in it's dialog box. Alignment Point Acquisition is set to Automatic. Is there another setting or a system variable that needs to be toggled, maybe something related specifically to Polylines?
  17. Hello everyone, I work with a glazing company and am trying to write an AutoLISP command that will automate a large part of our job by dimensioning glass panels with holes and cutout in the format that our supplier prefers. I will attach a photo here to show what I have done so far. The rectangle on the left shows what I would like the dimensions to look like. The rectangle on the right shows what my LISP routine currently does. I am having trouble writing the logic to dimension it in the way that I want. Rules it should follow are: 1) dimensions strings should be made to the corner nearest to the hole 2) if two holes are in-line, the dimension should pass through the closer hole 3) if two dimensions go to the same corner, they should stack at 3" intervals (TYP. offset set for DIMBASELINE) 4) Dimension strings should always be 3" behind the larger dimension above them (See the 5" measure at the top left) However, these rules only hold true for the "rectangle" shape option. In the final version of the routine, I am looking to have an easily expandable list of rules that I can modify and tweak per-shape. I have attached a test drawing and the current version of my LISP routine below. The code for dimensioning rules on the rectangle is found on lines 436-494. Any help figuring this out would be much appreciated. Thank you! Drawing File: autodimtest.dwg Current LISP: autoDim.lsp
  18. I'm still learning Lisps and am in the need of a function. I'm not going to say what i need it for, i want to try and write the lisp from the input of this forum. I need to know how to store the polyline width of a user selected polyline. for example, if i select a polyline and i run my lisp, or vice versa, the lisp will store the global width of the selected polyline into memory. (setq PW (ssget "polyline width") After i get this info, i will post my lisp and what it does. After you guys can share how you would have done it instead. and it will probably be better then my way. thanks ahead of time.
  19. i am new to all of this. would love to be able to remove all or most vertex's for any and all of my artwork. as for now i need to remove them from a circle. i do not know what the codes are for or how to use them. any help, would help.. i hopesecond sign Y.dxf second sign W.dxf
  20. I have a number of large files that have multiple layers with many simple objects. I wish to have a LISP program that searches the file and for certain layers, it looks for line and arcs that have the same start or end points I.E. a line has one end point that matches an arc or another line start point. Once it has found these, it converts the lines or arc into polylines and joins them together. I have a number of squares or rectangles that are constructed from simple lines and I want to end up with a closed polyline that is the same size as the original rectangle. This could also be an odd shape comprised of arcs and lines that is either open of a closed shape. I wont to convert these to polylines also (either open or closed depending on if the lines are enclosed or open). Can anyone suggest how to write this. I have very little experience of LISP.
  21. Hello to all, I have a challenge to place text markers along a polyline. As this polyline represents the trace of an linear object (in my case cable line) I would like to have at every 250m the length from the start of the line represented as "X +YYY", where X is the kilometer and YYY are the meters. Also it would be good to have the length from the start at every vertex. Can anyone help me with this, as I have no knowledge from lisp programing. Regards and thanks in advance!
  22. benhubel

    Extrim Multiple

    I love Extrim, but it only does one trim at a time. I am looking to trim everything that is selected at once. The pseudocode goes like this: 1. Get selection 2. Filter out everything but closed polylines 3. Ask user if they want to just trim crossing lines, or to delete everything 4. selected on that side of the line. 5. Get a point as the side to extrim on. If inside any selected polyline, get the inside point of each polyline and then trim inside each one (or inside the boundary of any crossing ones). Likewise, if outside of all selected polylines, trim the outside of each one (or outside the boundary of any crossing ones). My main problem is that I have no clue what I'm doing when it comes to dealing with Extrim. The syntax keeps throwing me around. I thought it would be super simple when I started, but because Extrim is a LISP rather than a command, it's got me really confused. I was planning to make use of alanjt's SelectWithinCurve routine to help with deleting non-crossing geometry.
  23. Hi all I'm working on some information that I have imported into LT 2017 from 12D survey software. Basically I have a road string (polyline made up of arcs) and I'm tidying it up. All I have done to this string is break it and change the layer it is on. When I go into Paper space and look at my plan layout, the broken polyline displays as though it is a full circle. In Model space it looks how it ought. I have double-clicked in the viewport and selected the circle and changed the colour for easy identification. Then, when I go back to Model space, I have a red curved polyline. No circle. I have also tried copying the polyline as a block and pasting it into paper space. It displays as it ought to. If I paste it back into Model Space, it retains its characteristics - i.e. curve in model space, circle in paper space. If I explode the polyline into its component arcs and join them together again, it begins to behave properly. This never used to happen in prior versions of CAD, and my co-worker has had a similar problem. She says it's not a consistent fault - sometimes the display behaves and sometimes it doesn't. I have run audits and purges and all sorts of fun things and have achieved nothing. It prints correctly, but the preview shows it as a circle also. Any ideas, or similar issues?
  24. Hi all, I thought there might be an intuitive/simple way to do this. I've tried the lisp routine SSX, BUT when you run the routine you can't "keep" the selection to use the PEDIT command. Is there something I'm missing here?
  25. Hello. I'm looking for a way to draw a polyline, where i enter the points with mouse clicking and when i click the final point and enter button, it writes in text the total lenght of polyline. I know that i can go to the properties and see the total lenght of the polyline and then i can use mtext to write that value near my polyline, but because i have to do that more than 1000s times, i was wondering if there is a faster way or a lisp routine. All ideas are welcome. P.S. I'm using Autocad 2009 and i'm beginner/medium user. Thank you
×
×
  • Create New...