Jump to content

Search the Community

Showing results for tags 'polyline'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • 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


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

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...

Found 115 results

  1. Hi. I am having trouble with some coding I found elsewhere. I would appreciate it if anyone could give me an insight as to how adjust the coding so that it works. [url="http://www.surveydrawing.net/wp-content/uploads/2012/06/mlin1.png"][img=http://www.surveydrawing.net/wp-content/uploads/2012/06/mlin1.png][/url] [color=#ff0000] ([/color][color=#0000ff]vl-load-com[/color][color=#ff0000])[/color][color=#ff0000]([/color][color=#0000ff]defun[/color] c:MLin[color=#ff0000]()[/color] [color=#ff0000] ([/color][color=#0000ff]setvar[/color][color=#ff00ff] “luprec”[/color] [color=#008000]2[/color][color=#ff0000])[/color] [color=#ff0000] ([/color]Cre_Lay[color=#ff00ff] “dist”[/color] [color=#008000]6[/color][color=#ff0000])[/color] [color=#ff0000] ([/color][color=#0000ff]setq[/color] disttot [color=#008000]0[/color][color=#ff0000])[/color] [color=#ff0000] ([/color][color=#0000ff]setq[/color] lines[color=#ff0000]([/color][color=#0000ff]ssget[/color] [color=#ff0000]([/color][color=#0000ff]list[/color] [color=#ff0000]([/color][color=#0000ff]cons[/color] [color=#008000]0[/color][color=#ff00ff] “line,pline,lwpolyline”[/color][color=#ff0000]))))[/color] [color=#ff0000] ([/color][color=#0000ff]setq[/color] ctr [color=#008000]0[/color][color=#ff0000])[/color] [color=#ff0000] ([/color][color=#0000ff]if[/color] [color=#ff0000]([/color][color=#0000ff]/=[/color] lines [color=#0000ff]nil[/color][color=#ff0000])[/color] [color=#ff0000] ([/color][color=#0000ff]progn[/color] [color=#ff0000] ([/color][color=#0000ff]setq[/color] len[color=#ff0000]([/color][color=#0000ff]sslength[/color] lines[color=#ff0000]))[/color] [color=#ff0000] ([/color][color=#0000ff]repeat[/color] len [color=#ff0000] ([/color][color=#0000ff]setq[/color] ent[color=#ff0000]([/color][color=#0000ff]ssname[/color] lines ctr[color=#ff0000]))[/color] [color=#ff0000] ([/color][color=#0000ff]setq[/color] pntList[color=#ff0000]([/color]ReadPline ent[color=#ff0000]))[/color] [color=#ff0000] ([/color][color=#0000ff]setq[/color] ptCntr [color=#008000]0[/color][color=#ff0000])[/color] [color=#ff0000] ([/color][color=#0000ff]repeat[/color] [color=#ff0000]([/color][color=#0000ff]1-[/color] [color=#ff0000]([/color][color=#0000ff]length[/color] pntList[color=#ff0000]))[/color] [color=#ff0000] ([/color][color=#0000ff]setq[/color] fpoint[color=#ff0000]([/color][color=#0000ff]nth[/color] ptCntr pntList[color=#ff0000]))[/color] [color=#ff0000] ([/color][color=#0000ff]setq[/color] epoint[color=#ff0000]([/color][color=#0000ff]nth[/color] [color=#ff0000]([/color][color=#0000ff]1+[/color] ptCntr[color=#ff0000])[/color] pntList[color=#ff0000]))[/color] [color=#ff0000] ([/color][color=#0000ff]setq[/color] thr[color=#ff0000]([/color][color=#0000ff]distance[/color] fpoint epoint)) [color=#ff0000] ([/color][color=#0000ff]setq[/color] fou[color=#ff0000]([/color][color=#0000ff]angle[/color] fpoint epoint[color=#ff0000]))[/color] [color=#ff0000] ([/color][color=#0000ff]setq[/color] ang[color=#ff0000]([/color][color=#0000ff]*[/color] [color=#ff0000]([/color][color=#0000ff]/[/color] fou [color=#0000ff]pi[/color][color=#ff0000])[/color] [color=#008000]180[/color][color=#ff0000]))[/color] [color=#ff0000] ([/color][color=#0000ff]if[/color] [color=#ff0000]([/color][color=#0000ff]and[/color] [color=#ff0000]([/color][color=#0000ff]>=[/color] ang [color=#008000]90[/color][color=#ff0000])[/color] [color=#ff0000]([/color][color=#0000ff]<=[/color] ang [color=#008000]270[/color][color=#ff0000]))[/color] [color=#ff0000]([/color][color=#0000ff]setq [/color]ang[color=#ff0000]([/color][color=#0000ff]rtos[/color] [color=#ff0000]([/color][color=#0000ff]+[/color] ang [color=#008000]180[/color][color=#ff0000])))[/color] [color=#ff0000]([/color][color=#0000ff]setq[/color] ang[color=#ff0000]([/color][color=#0000ff]rtos[/color] ang))) [color=#ff0000] ([/color][color=#0000ff]setq[/color] txt_ins[color=#ff0000]([/color]MidP fpoint epoint[color=#ff0000]))[/color] [color=#ff0000] ([/color][color=#0000ff]command[/color] [color=#ff00ff]“._Text” “j” “bc” [color=#000000]txt_ins[/color] “1.75″ [/color]ang [color=#ff0000]([/color][color=#0000ff]rtos[/color] thr[color=#ff0000]))[/color] [color=#ff0000] ([/color][color=#0000ff]command[/color] [color=#ff00ff]“._Change”[/color] [color=#ff0000]([/color][color=#0000ff]entlast[/color][color=#ff0000])[/color][color=#ff00ff] “” “p” “la” “dist” “”[/color][color=#ff0000])[/color] [color=#ff0000] ([/color][color=#0000ff]setq[/color] disttot[color=#ff0000]([/color][color=#0000ff]+[/color] disttot [color=#ff0000]([/color][color=#0000ff]distance[/color] fpoint epoint[color=#ff0000])))[/color] [color=#ff0000] ([/color][color=#0000ff]setq[/color] ptCntr[color=#ff0000]([/color][color=#0000ff]1+[/color] ptCntr[color=#ff0000]))[/color] [color=#ff0000] )[/color] [color=#ff0000] ([/color][color=#0000ff]setq[/color] ctr[color=#ff0000]([/color][color=#0000ff]1+[/color] ctr[color=#ff0000]))[/color] [color=#ff0000] )[/color] [color=#ff0000] ([/color][color=#0000ff]princ[/color] [color=#ff0000]([/color][color=#0000ff]strcat[/color][color=#ff00ff] “\nTotal distance :”[/color] [color=#ff0000]([/color][color=#0000ff]rtos[/color] disttot [color=#008000]2 4[/color][color=#ff0000])))[/color] [color=#ff0000] )[/color] [color=#ff0000] )[/color] [color=#ff0000] ([/color][color=#0000ff]princ[/color][color=#ff0000])[/color] [color=#ff0000])[/color] [color=#ff0000]([/color][color=#0000ff]princ[/color][color=#ff00ff] “\nType \”MLin\” to Measure each Segment of the Polyline.”)[/color] [color=#ff0000]([/color][color=#0000ff]princ[/color][color=#ff0000])[/color][color=#800000]; Function to find the mid point of two points.[/color] [color=#ff0000]([/color][color=#0000ff]defun[/color] MidP[color=#ff0000]([/color]midp_fpo midp_spo[color=#ff0000])[/color] [color=#ff0000] ([/color][color=#0000ff]setq[/color] midp_mpo[color=#ff0000]([/color][color=#0000ff]list[/color] [color=#ff0000]([/color][color=#0000ff]/[/color] [color=#ff0000]([/color][color=#0000ff]+[/color] [color=#ff0000]([/color][color=#0000ff]car[/color] midp_fpo[color=#ff0000])[/color] [color=#ff0000]([/color][color=#0000ff]car[/color] midp_spo[color=#ff0000]))[/color] 2) [color=#ff0000]([/color][color=#0000ff]/[/color] [color=#ff0000]([/color][color=#0000ff]+[/color] [color=#ff0000]([/color][color=#0000ff]cadr[/color] midp_fpo[color=#ff0000])[/color] [color=#ff0000]([/color][color=#0000ff]cadr[/color] midp_spo[color=#ff0000]))[/color] 2[color=#ff0000])))[/color] [color=#ff0000])[/color][color=#800000];Function to Create a Layer with given color.[/color] [color=#ff0000]([/color][color=#0000ff]defun[/color] Cre_Lay[color=#ff0000]([/color]lay_layn lay_laycol[color=#ff0000])[/color] [color=#ff0000] ([/color][color=#0000ff]if[/color] [color=#ff0000]([/color][color=#0000ff]=[/color] [color=#ff0000]([/color][color=#0000ff]tblsearch[/color] [color=#ff00ff]“Layer”[/color] lay_layn[color=#ff0000])[/color] [color=#0000ff]nil[/color][color=#ff0000])[/color] [color=#ff0000] ([/color][color=#0000ff]command[/color][color=#ff00ff] “._Layer” “n”[/color] lay_layn[color=#ff00ff] “c”[/color] lay_laycol lay_layn[color=#ff00ff] “”[/color][color=#ff0000])[/color] [color=#ff0000] ([/color][color=#0000ff]command[/color][color=#ff00ff] “._Layer” “t”[/color] lay_layn[color=#ff00ff] “on”[/color] lay_layn[color=#ff00ff] “c” [/color]lay_laycol lay_layn[color=#ff00ff] “”[/color][color=#ff0000])[/color] [color=#ff0000] )[/color] [color=#ff0000] ([/color][color=#0000ff]princ[/color][color=#ff0000])[/color] [color=#ff0000])[/color][color=#800000];Function to Read Vertices of Selected Lines.[/color] [color=#ff0000]([/color][color=#0000ff]defun[/color] ReadPline[color=#ff0000]([/color]imp_Ent[color=#ff0000])[/color] [color=#ff0000] ([/color][color=#0000ff]setq[/color] glb_obj[color=#ff0000]([/color][color=#0000ff]vlax-ename->vla-object[/color] imp_Ent[color=#ff0000]))[/color] [color=#ff0000] ([/color][color=#0000ff]setq[/color] glb_PntCnt[color=#ff0000]([/color][color=#0000ff]vlax-curve-getEndParam[/color] glb_obj[color=#ff0000]))[/color] [color=#ff0000] ([/color][color=#0000ff]setq[/color] returnPTList ‘[color=#ff0000]())[/color] [color=#ff0000] ([/color][color=#0000ff]setq[/color] ptCntr [color=#008000]1[/color][color=#ff0000])[/color] [color=#ff0000] ([/color][color=#0000ff]setq[/color] glb_oName[color=#ff0000]([/color][color=#0000ff]vlax-get-property [color=#000000]glb[/color][/color]_obj ‘ObjectName[color=#ff0000]))[/color] [color=#ff0000] ([/color][color=#0000ff]setq[/color] glb_OClosed [color=#0000ff]ni[/color][color=#ff0000][color=#0000ff]l[/color])[/color] [color=#ff0000] ([/color][color=#0000ff]if[/color] [color=#ff0000]([/color][color=#0000ff]=[/color] glb_oName[color=#ff00ff] “AcDbLine”[/color][color=#ff0000])[/color] [color=#ff0000] ([/color][color=#0000ff]progn[/color] [color=#ff0000] ([/color][color=#0000ff]setq[/color] glb_EnDetails[color=#ff0000]([/color][color=#0000ff]entget[/color] imp_Ent[color=#ff0000]))[/color] [color=#ff0000] ([/color][color=#0000ff]setq[/color] big_Point3d[color=#ff0000]([/color][color=#0000ff]cdr[/color] [color=#ff0000]([/color][color=#0000ff]assoc[/color] [color=#008000]10[/color] glb_EnDetails[color=#ff0000])))[/color] [color=#ff0000] ([/color][color=#0000ff]setq[/color] end_Point3d[color=#ff0000]([/color][color=#0000ff]cdr[/color] [color=#ff0000]([/color][color=#0000ff]assoc[/color] [color=#008000]11[/color] glb_EnDetails[color=#ff0000])))[/color] [color=#ff0000] ([/color][color=#0000ff]setq[/color] returnPTList[color=#ff0000]([/color][color=#0000ff]append[/color] returnPTList [color=#ff0000]([/color][color=#0000ff]list [/color]big_Point3d[color=#ff0000])))[/color] [color=#ff0000] ([/color][color=#0000ff]setq[/color] returnPTList[color=#ff0000]([/color][color=#0000ff]append[/color] returnPTList [color=#ff0000]([/color][color=#0000ff]list [/color]end_point3d[color=#ff0000])))[/color] [color=#ff0000] )[/color] [color=#ff0000] ([/color][color=#0000ff]progn[/color] [color=#ff0000] ([/color]setq glb_OClosed[color=#ff0000]([/color][color=#0000ff]vlax-curve-isClosed[/color] glb_obj[color=#ff0000]))[/color] [color=#ff0000] ([/color][color=#0000ff]setq[/color] glb_2dDist 0[color=#ff0000])[/color] [color=#ff0000] ([/color][color=#0000ff]setq[/color] old_Point [color=#0000ff]nil[/color][color=#ff0000])[/color] [color=#ff0000] ([/color][color=#0000ff]repeat[/color] [color=#ff0000]([/color][color=#0000ff]1+[/color] [color=#ff0000]([/color][color=#0000ff]fix[/color] glb_PntCnt[color=#ff0000]))[/color] [color=#ff0000] ([/color][color=#0000ff]setq[/color] cur_Point3d[color=#ff0000]([/color]vlax-curve getPointAtParam glb_obj [color=#ff0000]([/color][color=#0000ff]1-[/color] ptCntr[color=#ff0000])))[/color] [color=#ff0000] ([/color][color=#0000ff]setq[/color] returnPTList[color=#ff0000]([/color][color=#0000ff]append[/color] returnPTList [color=#ff0000]([/color][color=#0000ff]list [/color]cur_Point3d[color=#ff0000])))[/color] [color=#ff0000] ([/color][color=#0000ff]setq[/color] ptCntr[color=#ff0000]([/color][color=#0000ff]1+[/color] ptCntr[color=#ff0000]))[/color] [color=#ff0000] )[/color] [color=#ff0000] )[/color] [color=#ff0000] )[/color] [color=#ff0000] ([/color][color=#0000ff]setq[/color] return returnPTList) [color=#ff0000])[/color] [/Code] Thanks in advance for your assistance.
  2. Hello you all I am so frustrated about one thing that has been changed in the newest version (2013) Before, in PL command, 2D, I could point my marker at one snap point on a line for example, then I drag my marker to one direction towards where I want the Polyline to start. I write in an number (ex. 1000 mm) for the distance from the snap point, and ENTER it. The polyline starts now 1000 mm from the snap point I chose. NOWADAYS it attaches in an RANDOM, and for me, inappropriate place on the current drawing when I ENTER the distance Is it some settings I have to change to get this as it was in the 2012 version? I am a terrible explainer, so ask if you don't get it. I will marry the one, or those, who can help me with this, I bought some fantastic rings for us. EDIT: Attached file Skissing.dwg
  3. Hi, I need to calculate distance between two points along a polyline. These points may exist on different segments of the same polyline. Maybe there is a function, I couldn't find it. I'd be very grateful for your help.
  4. thpals

    Polylines appear extremely thick

    I'm using Autodesk Map 2005 and I have a problem that I can't solve: When drawing with polylines, they appear EXTREMELY thick (24.300). Sometimes it doesn't happen and sometimes, in the middle of a work, this situation comes up. If there is somebody out there who can tell me how to adjust the system, so all lines appear just thin, I would be very grateful !
  5. Hi all: I like using Lisps, but don't know how to write code for them. I like this particular lisp created by Mosad Elewa and posted on Cadalyst.com. When trying the lisp on a polyline, it did not work. Seems to only work on a "line". Here's the code: ---------------------------------------------------------------------------------------------------- ;;;CADALYST 02/07 Tip 2180: DIV.LSP Modify Divide © 2007 Mosad Elewa ;DIV.LSP BY MOSAD H. ELEWA (1996) (defun C:DIV () (setq ent (entget (car (entsel "\nSelect object to divide")))) (setq etype (cdr (assoc 0 ent))) (if (eq etype "LINE") (progn (cond ( (setq m (getint "\nNumber of segments")) (setq pt1 (cdr (assoc 10 ent))) (setq pt2 (cdr (assoc 11 ent))) (setq ang (angle pt1 pt2)) (setq dist (distance pt1 pt2)) (setq dd (/ dist m)) (setq pt3 (polar pt1 ang dd)) (setq ang2 (+ ang 1.5708)) (setq pt4 (polar pt3 ang2 (/ dd 4))) (setq ds (distance pt1 pt3)) (command "line" pt3 pt4 "") (setq pt5 (polar pt3 ang2 (/ dd )) (command "move" "l" "" pt4 pt5) (setq d 0) ; (setvar "cmdecho" 0) (command "copy" "l" "" "m" pt1) (repeat (- m 2) (command (polar pt1 ang (setq d (+ d ds))))) (command ""))) )) (if (eq etype "ARC") (progn (setq n (getint "\Number of segments")) (setq ang (cdr (assoc 50 ent))) (setq ang2 (cdr (assoc 51 ent))) (setq ang3 (- ang2 ang)) (setq ang4 (/ (* ang3 180.0) pi)) (setq cp (cdr (assoc 10 ent))) (setq r (cdr (assoc 40 ent))) (setq pt1 (polar cp ang r)) (setq pt2 (polar cp ang (/ r 4))) (setq pt3 (polar cp ang (/ r )) (command "line" cp pt2 "") (command "move" "l" "" pt3 pt1) (command "array" "l" "" "p" cp (+ n 1) ang4 "y") )) (if (eq etype "CIRCLE") (progn (setq n (getint "\Number of segments")) (setq cp (cdr (assoc 10 ent))) (setq r (cdr (assoc 40 ent))) (setq pt1 (polar cp 0 r)) (setq pt2 (polar cp 0 (/ r 4))) (setq pt3 (polar cp 0 (/ r )) (command "line" cp pt2 "") (command "move" "l" "" pt3 pt1) (command "array" "l" "" "p" cp n "360" "y") )) (princ) )[/CODE] -----------------------------------------------------------------------------------------------------
  6. Hi, Can anyone help me to write a lisp function to sort the points (assume the intersection points) on a polyline? With my code, I have a polyline object and a set of intersection points on it. I need to calculate the cumulative distance between those points and vertex points consecutively. Thanks,
  7. hi i am making a wiring to autcad blocks using polyline and then i make fillet to smooth the angle, what i need is after making all wiring i want to trim the wire that is pathing internally thanks in advance for any help the snapshot picture at
  8. I am in a hurry with the project so I don't have time to write this lisp myself specially couse I don't have any experience in it, so if anyone can help that would be great. Anyway I have a lot of parcels drawn in autocad and what i need to do is trim all the polyline endings and intersections and insert a point in the middle. Manually I do it this way: - first i make circles (radius has to be 0.5) on the endings and intersections of polylines - then I trim all the lines inside the circles - then I insert a point in the center of circles and at the end delete circles. There is also a picture at the bottom showing the first and the last fase of the process. If anyone knows about the lisp that does that or maybe have time to write one it would help me a lot. Thanks in advance. :-)
  9. 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
  10. HELLO AGAIN CADTutor! I have a problem of weather of not you can change the accuracy of the calculation of areas in AutoCAD 2011. In my line of work, we need to find the areas to exact precision, though it seems that my AutoCad is messing with the calculations and rounding up. E.G AREA - .017666 and turns it into .002 I calculate the Area thorught the usage of Polylines, and or the area command when i need to. Can anyone please help me find some insight on to this, mabye to change it to give me EXATE AREA!? Any and all help is greatly appreciated, those who are deemed awesome get a virtual cake, and the cake is NOT a lie....
  11. I need help to calculate area of multiple closed polyline shapes. In my drawing I could have hundreds of shapes as shown in the picture. I want to find total of the shaded area by adding the area of the outer shapes. Then subtracting the area of the Inner shapes. Maybe there is a better way to do it? Any help would be appreciated. Thanks.
  12. I'm having issues in a particular drawing with moving a single polyline. I'm trying to move one polyline, but it instead moves all connecting polylines and some nearby polylines. My specific example: I have a layer for the existing house, a layer for a hedge, and a layer for a fence. The polyline for the hedge is currently touching the polyline for the house and the fence polyline is next to it (but not touching). When I click on the hedge and try to pull it away from the house (whether from the end grips or midpoint) it will also try to move the polyline of the house that it's touching and the polyline of the fence that is closest to the hedge. When I try to move it using the MOVE command, the same thing happens. I've tried shutting down CAD and turning it back on, opening it on another computer, flattening the entire drawing, and copying everything and pasting it into a new file. Nothing has worked so far. Any ideas on how to fix this?
  13. I'm making a polyline arc and would like the arc to go the other way. What button do I press to make that happen? I stumbled upon it one day, but have forgotten the button. Anyone know?
  14. Hi, I'm a french user of AutoCad, so I hope my english will be great. I work in public work. For a new project, our client gives us : *___a large amount of plan representing *____________"pull box" (burried in the ground) *____________section of cables connected to the pull box. *___for each plan, we have an excel table which give us for each section *____________the start pull box *____________the finish pull box But we don't have the length of section in this table. We have a lot of plans and for each plan, there are lot of section. Pull box are block with attributes section are polyline. We are looking for a code who can extract the length of all section of a plan Is there someone here who can help me? a lisp code that is almost the same that i'm looking for ? something i can adapt ? Thank you in advance. If you have question, don't hesitate.
  15. Could someone help point me in the right direction here? I want to filter a selection of polylines (contour lines) by their Z value (ie filter to get only 10' or 5' or 2' contours). I assume I need to test the Z value to see if it is a muliple of 10, 5 or 2, etc... Any hints on hhow to get this sarted? Thanks
  16. Hi i required a lisp to draw a poly line along with 2 closed poly lines. If i pick 2 vertexes on 2 polygons, 1 new poly line should be created between these two points along with polygon walls. can any body help. Please refer screen shot for your reference thanks, Prasad
  17. Hi all - I created a lightweight polyline by filleting two straight polylines to create 1 polyline that contains an arc. I would like to convert the arc into a series of straight polylines that mimic the original shape of the arc, while not disturbing the straight parts of the polyline. I found a .lsp routine that does this perfectly, but it only works for the older heavyweight polylines. Can anyone help modify this routine so it works for lightweight polylines or provide another suggestion? Id rather not convert to heavyweight, use the routine, and convert back to lightweight. Thanks so much! Here is the code: ;;;Translate plines w/ arcs to plines w/ mult. straight segments for use ;;;with DTM TIN's for contouring. Rounds out pline arcs via a suitable no. ;;;of straight segments. The determiner is based on small angle deflection. ;;; ;;; AUTHOR: HENRY C. FRANCIS ;;; 425 N. ASHE ST. ;;; SOUTHERN PINES, NC 28387 ;;; ;;; All rights reserved without prejudice. ;;; ;;; Copyright: 5-10-96 ;;; Edited: 10-1-98 ;;; (DEFUN c:plxl (/ found) (SETQ osmod (GETVAR "osmode") fltot 0 incrn 0 ) ;_ end of setq (SETVAR "osmode" 0) (SETQ usrdeg (ureal 1 "" "Deflection angle (< 5 degrees)" (IF usrdeg usrdeg 5.0 ) ;_ end of if ) ;_ end of ureal ) ;_ end of setq (SETQ usrrad (* (/ usrdeg 180.0000) PI)) (SETQ pliness (SSGET '((0 . "POLYLINE")))) (IF pliness (PROGN (COMMAND ".undo" "m") (SETQ plinesslen (SSLENGTH pliness) sscount 0 ) ;_ end of setq (WHILE (< sscount plinesslen) (SETQ currpline (SSNAME pliness sscount)) (SETQ plent (ENTGET currpline)) (SETQ plvert (ENTGET (ENTNEXT (CDAR plent)))) (PROGN (ENTMAKE (LIST (ASSOC 0 plent) (ASSOC 8 plent) (ASSOC 66 plent) (ASSOC 10 plent) (ASSOC 70 plvert) ) ;_ end of list ) ;_ end of entmake (ENTMAKE (LIST (ASSOC 0 plvert) (ASSOC 10 plvert) ) ;_ end of list ) ;_ end of entmake ;;;----repeat this until the end of the polyline (WHILE (/= (CDR (ASSOC 0 (ENTGET (ENTNEXT (CDAR plvert))))) "SEQEND" ) ;_ end of /= ;;;------if it begins an arc segment (IF (/= (CDR (ASSOC 42 plvert)) 0) ;;;--------do this (PROGN (SETQ found T) (SETQ plnvert (ENTGET (ENTNEXT (CDAR plvert)))) (SETQ strt40 (CDR (ASSOC 40 plvert))) (SETQ end41 (CDR (ASSOC 41 plvert))) (SETQ fpt1 (CDR (ASSOC 10 plvert))) (SETQ fpt2 (CDR (ASSOC 10 plnvert))) (SETQ chrdl (DISTANCE fpt1 fpt2)) (SETQ theta (ATAN (CDR (ASSOC 42 plvert)))) (SETQ psi (- (/ PI 2) (ABS theta))) (SETQ phi (* (ABS theta) 4)) (SETQ chang (ANGLE fpt1 fpt2)) (SETQ arcr (ABS (/ (* (DISTANCE fpt1 fpt2) (SIN psi)) (* 2 (COS theta) (SIN (* 2 theta))) ) ;_ end of / ) ;_ end of abs ) ;_ end of setq (SETQ arcc (IF (> theta 0) (POLAR fpt1 (+ (- chang theta) psi) arcr) (POLAR fpt1 (- (- chang theta) psi) arcr) ) ;_ end of if ) ;_ end of setq (SETQ fenl (* phi arcr) count (1+ (FIX (/ phi usrrad))) plwinc (/ (- strt40 end41) count) plwe (+ strt40 plwinc) incra (/ phi count) incrn 0 initang (ANGLE arcc fpt1) ) ;_ end of setq (WHILE (> count 0) (SETQ incrn (1+ incrn)) (SETQ plwb plwe plwe (- plwe plwinc) ) ;_ end of setq (IF (< theta 0) (SETQ fpt4 (POLAR arcc (- initang (* incrn incra)) arcr) ) ;_ end of setq (SETQ fpt4 (POLAR arcc (+ initang (* incrn incra)) arcr) ) ;_ end of setq ) ;_ end of if (PROGN (ENTMAKE (LIST (CONS 0 "VERTEX") (ASSOC 8 plvert) (CONS 10 fpt4) ) ;_ end of list ) ;_ end of entmake (GRDRAW fpt1 fpt4 -1) ) ;_ end of progn (SETQ fpt1 fpt4 count (1- count) ) ;_ end of setq ) ;_ end of while (SETQ plvert (ENTGET (ENTNEXT (CDAR plvert)))) ) ;_ end of progn ;;;--------or else it begins a line segment so do this (PROGN (SETQ fpt1 (CDR (ASSOC 10 plvert))) (SETQ fpt2 (CDR (ASSOC 10 (ENTGET (ENTNEXT (CDAR plvert))))) ) ;_ end of setq (SETQ fenl (DISTANCE fpt1 fpt2)) (ENTMAKE (LIST (CONS 0 "VERTEX") (ASSOC 8 plvert) (CONS 10 fpt2) ) ;_ end of list ) ;_ end of entmake (GRDRAW fpt1 fpt2 -1) (SETQ fpt1 fpt2) (SETQ plvert (ENTGET (ENTNEXT (CDAR plvert)))) ) ;_ end of progn ) ;_ end of if ) ;_ end of while (IF found (PROGN (ENTMAKE (LIST (CONS 0 "SEQEND") ) ;_ end of list ) ;_ end of entmake (ENTDEL currpline) ) ;_ end of progn (PROGN (ENTMAKE) (COMMAND ".redraw") (PRINC "\nPolyline contains no arcs. ") ) ;_ end of progn ) ;_ end of if ) ;_ end of progn (SETQ sscount (1+ sscount)) ) ;_ end of WHILE ) ;_ end of progn ) ;_ end of if (PRINC) ) ;_ end of defun ;|«Visual LISP© Format Options» (72 2 40 2 T "end of " 60 9 2 0 0 T T nil T) ***Don't add text below the comment!***|; I also had to add this into AutoCAD to get it to work: ;This function is freeware courtesy of the author's of "Inside AutoLisp" for rel. 10 published by New Riders Publications. This credit must accompany all copies of this function. ; ;* UREAL User interface real function ;* BIT (0 for none) and KWD key word ("" for none) are same as for INITGET. ;* MSG is the prompt string, to which a default real is added as <DEF> (nil ;* for none), and a : is added. ;* (defun ureal (bit kwd msg def / inp) (if def (setq msg (strcat "\n" msg " <" (rtos def 2) ">: ") bit (* 2 (fix (/ bit 2))) ) (setq msg (strcat "\n" msg ": ")) );if (initget bit kwd) (setq inp (getreal msg)) (if inp inp def) );defun ;* (princ) ;*
  18. Morning all, I am very very new to autocad and trying to solve an issue I have at work regarding line types not showing up correctly. I have several .dwg files which I attach using XREF so that I can ensure I have the latest versions combined. The problem is that the line types do not show up correctly. After looking up on google I have found that this is a problem due to it being a 3d model rather than it being flat. I managed to half solve the issue by inserting each drawing into one, then exploding the whole image. Then changing the scale in the bottom right to around 1:200 to make the line types visible. My problem is this ends up being alot of work as the separate drawings can be updated daily. Is it possible to have all the drawings Xref'd in and to be able to have the scale changed to be able to read the line types? I tried to save the XREF setup as a template, then just bind all the drawings into one, explode and change the scale. But for some reason this doesnt work for me. I end up with just solid lines, rather than line types. I don't think it helps that the drawings are made up of several lines, all of different length. (This I have been told is why the scales do not appear correctly) I have been shown one method to work around this, which is to open the Xref drawings, explode them, then take each section of line and manually change each scale to the biggest that shows up. A very painful process when I might need to do it everyday!!! Any help would be appreciated.
  19. I need to know how to get the start and end points of a polyline. I'm a rookie at this and just learned how to pull out the start and endpoints of a line and when I went to do it to a polyline I was completely lost. Another question: I use a comand that takes a line and turns it into a perforated line with each segment being a separate poly line. It creates them all in order down the line. Immediately following this command, would there be a way to call the first poly line created to extract its data, without manually selecting it?
  20. Hi All I have been searching for a way of exporting multiple polyline or spline coordinates to txt file and all I can find is ones that write out as a single continuous list of coordinates with nothing denoting which one is which. I really need it to be able to export each polyline as a group, and I would also love for it to be able to include the number of points and name of the layer eg: polyline 'number of points' 'layername' 0.0 0.0 0.0 1.0 1.0 0.0 2.0 2.0 0.0 polyline 'number of points' 'layername' 0.0 0.0 0.0 1.0 4.0 0.0 2.0 8.0 0.0 and so on..... Any help with this would be much appreciated
  21. Hi, im working on a project for university and it involves using .shp files, which i've imported fine, however the problem is that when i draw a line or polyline then save the file, close the program, reopen the file, the polyline appears for a split second while opening but then it disappears once the shape file loads. the polyline is on an active layer and i cant find it even when i untick the shape file in the task pane box so that there is nothing else in the drawing window. Any help would be greatly appreciated!
  22. Hi, Is there any way at all to draw a new polyline - from the endpoint of another polyline, and have it automatically join as one polyline from the existing section?? I know this can be done via PEDIT, but its so laborious and soo many clicks, and I have alot of segmented Polylines that I need to consolidate when I draft. Any assistance would be greatly appreciated! Thanks! Matt
  23. I have a great request. I need to scale some polyline contours from ground to grid coordinates. Using the scale comand this works, but the Z value is scaled as well. The thing is, I want to scale the X and Y only, not the Z. So far the only way to do this is to create a block, scale it, then explode. This takes a lot of time that to me seems unnecessary. So this is what I was thinking for a lisp routine that can do what I need. Select a polyline (contours) Scale the polyine to some factor. Reset the Z value to the orginal value before scaling. I hope this makes sense. Haha. Anyone willing to tackle this?
  24. 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?
  25. Rooster142

    Polylines have only one handle

    I am working in LT 2008 and the program spontaneously started making polylines with just one handle. I am picking the button on the tool panel, not doing anything different. I am working in a complicated floor plan from a client working out square footage of various areas. When I draw a polyline in an open space I get handles at each corner, but if I trace over existing lines on locked layers there is only one handle at the start point. I have been working on this drawing for several days and the issue just started today. Any solutions would be appreciated. Please note, I am a user of AutoCAD (15 years), not a programer so talk down to me, I won't be offended.
  • Create New...