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. 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
  2. 1st Post, woot woot. I searched through many of the existing forums but couldn't find one that addressed this issue... I work a lot with polylines, to create design contours. I usually have a contour at the bottom or top of a hill, then I use the 'offset' command to offset the line to conform to a 3:1 slope as far as I need, to tie into the existing topo. My problem is, after offsetting all these plines, they are all at the same elevation as the original line. Is there a faster way to change the elevation than clicking on a line, entering the elevation in the properties window, clicking on a new line, wash-rinse-repeat? This is very tedious, especially with 20+ offset lines each time. Or is there a way to offset with increasing/decreasing elevations each time? Thanks
  3. 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.
  4. 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
  5. 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.
  6. 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!
  7. 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?
  8. 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?
  9. 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
  10. Hi all, I am using AutoCad 2015, the problem I have is that when I select a polyline, do select similar and change the global width to 0.15 (for example) then when I save the drawing and re-open it, when I select the polyline and select similar, it says the global width is varies. I know this sounds like a rather minor problem but at work, everything gets checked and these kind of small errors do have a rather large effect on our performance rating. The strange thing about this is that it only happens for some drawings and not all drawings. Unfortunately that is all the information I really have on the problem so I hope that is enough. Thank you for your time, Josh
  11. I met a very "strange" behavior of VBA with Fillet Command send via ThisDrawing.SendCommand function. I have the function Fillet_2Line (line1, line2, r), which will apply the Fillet command to line1, line2 with Radius=R Sub fillet_2line(line1 As Variant, line2 As Variant, radius As Double) Dim text As String text = "f" & vbCr & "r" & vbCr & radius & vbCr & "(handent " & Chr(34) & line1.Handle & Chr(34) & ")" & vbCr & "(handent " & Chr(34) & line2.Handle & Chr(34) & ")" & vbCr ThisDrawing.SendCommand (text) End Sub As you can see, the function is very simple, call Fillet command from Autocad then select two lines by their handle. Use can reproduce the function without VBA by call Fillet command and select two POLILINES by their HANDLE. However, it works on LINE, but NOT POLYLINE. If I select two polylines by left click on them, it works. But if I select two polylines by their HANDLE, it does not work! Fillet 2 Line - Selected by left click - Works Fillet 2 Line - Selected by handle - Works Fillet 2 PLine - Selected left click - Works Fillet 2 PLine - Selected by handle - Does not work
  12. how do i do this?

    Convert Lines to Polylines

    Hi all, was just wondering how to convert a bunch of lines into one continuous polyline?
  13. Hi! First of all, This is my first post here and I'm not an EXPERT in english, so I will try to explain as good as possible. I'm using Inventor 2012 and AutoCAD Mechanical 2012. In Inventor I have a piece in which it was applied the punching tool (Custom one) it works Perfectly, but when I export it to autoCAD it comes with too many points or vertex, I know if I draw it in autocad I wont have that problem, what that's why we use a Punch Tool, to simplify things and get things easier and always the same. Re-draw is out of the question, unless its the ONLY solution.. We use two CNC Plasma Machine, one of them uses the Software CamBAM and it can edit the vertex and simplifies it and jobs done, but it cant export the job to .dwg or .dxf.. and the second and new machine (the one i'm having trouble) uses FastCAM software, it has something similar to adjust the vertex but, the real problem is within the FastNEST.. Either way, the best solution is to fix the drawing in autocad. EDITPOL doesnt work, as it just joins it, I need to make less points.. I could Upload the file if needed. I'd Really Appreciate any help given. Thanks and Again sorry for my many typos.o:)
  14. Dear all, I'm a newcomer I already read the forums a few times and found answers all the time, but sadly its not that time. My problem is te following: I got a 61MB big drawing which i should modify. Sadly my computer isn't fast enough to handle that much information. I attached an example which shows why the file is this big. (Sadly i'm not able to upload this in dwg, because the example file which i made also takes 5MB of free space... ) There you can see that loops are made from much-much more lines than needed. If i could unite lines which has the same X or Y coordinates that would come out in a smaller file size and lesser CPU capacity. Do we have any command which does something like this? Do you have any other idea how to correct this kind of thing? Any help is appriciated. Thanks in advance! The picture about the problem:
  15. Hi All, I have a non-square polyline and I would like to either shrink or expand it by, for example, 1 mm in all directions. The scale command doesn't work because that keeps all of the ratios the same which I don't want to happen. I'm using AutoCAD 2013. Thanks in advance for any suggestions.
  16. I work as a boat designer and often require calculating total length of polyline & centre of gravity (both open & closed polylines). I have a snippet below to show the sample code I am currently using - this only works with a group of lines - it doesnt work with polylines. Currently everytime I have to calculate the CG, I have to copy the polyline over, explode it & select the lines to calculate the CG. The logic is as follows - assuming we have 3 segments on the polyline(A,B,C) : Centre of Gravity of Polyline = (Len of A multiplied by Centroid of A + Len of b multiplied by Centroid of B + Len of C multiplied by Centroid of C) divided by Total Length of polyline I am new to LISP & although have some background in other programming languages, find it is relatively difficult to write the code, the syntax being very different. I found a similar code ( TotalADD Total Addition by Andrea Andreetti & modified to come to the below code). It would be ideal if I can select a group of polylines (using select similar) and run the command to get a text table in autocad with CG & total length calculated for set of polylines on different layers. But I am not sure how this can be achieved. Would you be able to help or am I asking for too much ? any guidance will be much appreciated. (if (eq (vla-get-objectname n) "AcDbLine") (progn (setq itemlinelength (+ itemlinelength (vla-get-length n))) (setq StartPoint(vlax-safearray->list (vlax-variant-value (vla-get-startpoint n)))) (setq x1 (car Startpoint)) (setq y1 (cadr Startpoint)) (setq EndPoint(vlax-safearray->list (vlax-variant-value (vla-get-endpoint n)))) (setq x2 (car endpoint)) (setq y2 (cadr endpoint)) (setq xmid (* (+ x1 x2) 0.5)) (setq ymid (* (+ y1 y2) 0.5)) (setq xmom (* xmid (vla-get-length n))) (setq ymom (* ymid (vla-get-length n))) (setq itemxmoment (+ itemxmoment xmom)) (setq itemymoment (+ itemymoment ymom)) ) ) (setq totxcg (/ itemxmoment itemlinelength)) (setq totycg (/ itemymoment itemlinelength)) (setq tlength (rtos itemlength 2 ) (setq totxcg (rtos totxcg 2 ) (setq totycg (rtos totycg 2 ) (acet-ui-status (strcat "Length: " tlength "\n" "X CoG Pos: " totxcg "\n" "Y CoG Pos: " totycg "\n" )
  17. Hi to all, Please someone knows one lisp to get length of a PL (polyline) and write it above this PL in associative and dynamics form? As the Picture. If the length is changed the text follow these data. Thanks in advance.
  18. Hi everybody, this is my first post. I need a Lisp to generate a polyline from existing points. The polyline should be created from all the points at the edge of the cloud of points generated by a 3d scanner. The points are in 3 dimensions, but they could be flatted to zero. The polyline can be close or open: it does not matter. Any idea? Thank you folks in advance. dave:acad:
  19. Hey guys, I'm trying to get the four corners of a rectangle in modelspace set to variables and I'm having a hard time with it. I'm able to get the four corners into a list, but I'm having a hard time setting each coordinate to a variable. The issue I'm having at this point is that the second variable duplicates the coordinate values. The first variable Here's what I got so far... (defun c:test (/ ptlist x y) (setq ptlist (massoc 10 (entget(car(entsel))))) (defun c:massoc (key alist / x nlist) (foreach x alist (if (eq key (car x)) (setq nlist (cons (cdr x) nlist)) ) ) (reverse nlist) ) ;end (princ ptlist) (setq x (car ptlist)) (setq y (cadr ptlist)) (princ) (princ x) (Princ) (princ y) ) I got part of this code from here When I draw in a rectangle in modelspace and I use this code, this is what I'm getting. Command: TEST Select object: ((18.2488 -11.0958) (23.6419 -11.0958) (23.6419 -5.32136) (18.2488 -5.32136))(18.2488 -11.0958)(23.6419 -11.0958)(23.6419 -11.0958) So it builds the list and sets the first variable right, but it duplicates the second. Thanks in advance! e: I haven't added in error trapping yet, just trying to figure this out first.
  20. Does anyone know of a field expression or lisp routine that will allow me to display a count of the number of polylines on any specified layer? I would like the number displayed to be able to update as I add polylines to the layer, just as an area field expression would update on regen. Thanks very much
  21. Hi I am using AutoCAD 2014 'Architecture workspace' and I use the Properties palette a lot to change the attributes of linework to display linetypes/global thickness/scale etc. However, when I click on the model item (eg. polyline) the Properties palette doesn't change to inform me what the properties are of that item. Instead, it stays the same as the default properties type. Also, things like Global Width/Length/Area etc do not show in the Properties box - is there a way of loading or changing this as I believe I might have the wrong Palette loaded etc ?? Is there a way to load a new palette? Please help? Cheers Paul
  22. Evening All I work as a design assistant for a West End Set Designer who loves working in forced perspective & vanishing points. My question is how do I slice/trim a 3d polyline that runs through a solid. I basically want to cut the line once it touches the face of the solid. I would be also happy to add a node. Attached is a small example of the working file. Look forward to your responses Cheers James EXAMPLE.dwg
  23. Hello, I am working on a tunnel alignment. I have to draw multiple closed 3d polylines from AutoCAD Points (which form the tunnel sections from the excavation). I use the 3POLY command and then the option "PN. Is it possible to write a script (or a lisp routine) that repeats this process? For example, I wrote this script 3POLY 'PN 1-10,1 (1 row blank) 3POLY 'PN 11-20,11 It draws the first closed 3dpoly (from point numbers 1 to 10 and closes to 1) but it not continues to second 3poly. Thank you in advance
  24. I have been searching for a very long time and i hope you can help me this way cause i found nothing. The thing is, i have a polyline and set its thickness but i need something like 3DFACE which can cover those open areas on the bottom and top. Nothing ever worked, except for dividing it into million pieces and applying 3dface/loft for each, lol
  25. I need a lisp routine that can take a long polyline and delete all the arc segments, thus leaving multiple shorter polylines (all consisting only of straight segments). Can anyone help me with this please?
×
×
  • Create New...