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, in order to obtain a seabed profile for a school project, I need to get the Y coordinate of a polyline on several Kilometers with a fxed X step of 2m between each point. For the moment, the only manual solution I have found is to create a vertical line every 2m and to get the distance between the intersection of this line with my polyline and an horizontal line representing the mean sea level. Is there any way to automatize it because it is very long to do manually and I don't have enough time ? I did not succeed in doing this with dataExtraction. I also found on the internet a LISP file which extract the coordinates of points contained in the window. Nevertheless, I was told it is not possible to create automatically points on a curved polyline with a fixed x step. What I need at the end is an excel file of this type to use it in another software: X(m) Water Depth (m) 0 15.121 2 15.134 4 15.147 ... ... I precise I am a beginner in autocad, I have started today. Have you got any idea to solve this problem ? Thank you in advance
  2. Hi, As the thread title suggests, I want to create a segmented polyline with known angles / lengths, but I want to do this in 1 operation without having to copy/rotate/chamfer etc. I think I'm gonna kick myself when I receive an answer to this as it seems to be something I should know. I'm sure it has something to do with UCS, but I've not used it in quite some time, I am stumped and everything I have tried so far has failed.
  3. Dear Lisp Masters, I need help to do this: 1 - Insert a Multileader with a user defined block - OK, no problem. 2 - Pick to place block - OK, no problem. 3 - Pick to place arrow - OK, no problem. So far so good, then a lisp capable of: 4 - Pick to select a polyline. 5 - Collect some info from polyline such as width, lenght, layer, vertices coodinates (x,y,z) etc. 6 - Pick to select a Multileader 7 - Insert the collected info into the block attributes values. It's possible to do that? Greetings from Portugal!!!
  4. I made a very simple lisp to draw a line according to a requested slope ratio like 1:4, 1:10 ect it works fine for "normal" angles, but when it comes to ratio like 1:60 or 1:0.001 the result is inconsistent... I mean sometimes it will be displayed fine, or on the x axis (ie with no inclination at all) or will draw only a point with no length or will snap to another line (sitting very close) And all of that even if the values for the end point are correctly computed... Something else, if I draw a very long line like (1700 m) then it's always displayed correctly... If someone has an idea/ explanation I'll be very thankfull here is the code (defun C:slp( / refpt dirpt x_ratio seglen xref yref dirangle reqangle xend yend) (setq refpt (getpoint "\nPick a reference point")) (setq dirpt (getpoint "\nPick a direction point")) (setq x_ratio (getreal "\nSlope ratio 1:")) (setq seglen (distance refpt dirpt)) (setq xref (car refpt)) (setq yref (car (cdr refpt))) ;zref=0 (setq dirangle (angle refpt dirpt)) (setq reqangle (atan 1 x_ratio)) (princ (strcat "\ndirection angle: " (rtos dirangle) " requested angle: " (rtos reqangle))) (cond ( (and (> dirangle 0) (< dirangle (/ pi 2))) (setq xend (+ xref (* seglen (cos reqangle)))) (setq yend (+ yref (* seglen (sin reqangle)))) (setq endpt (list xend yend 0.00)) (command "pline" refpt endpt "") ) ( (and (> dirangle (/ pi 2)) (< dirangle pi)) (setq xend (- xref (* seglen (cos reqangle)))) (setq yend (+ yref (* seglen (sin reqangle)))) (setq endpt (list xend yend 0.00)) (command "pline" refpt endpt "") ) ( (and (> dirangle pi) (< dirangle (/ (* pi 3) 2))) (setq xend (- xref (* seglen (cos reqangle)))) (setq yend (- yref (* seglen (sin reqangle)))) (setq endpt (list xend yend 0.00)) (command "pline" refpt endpt "") ) ( (and (> dirangle (/ (* pi 3) 2)) (< (* pi 2))) (setq xend (+ xref (* seglen (cos reqangle)))) (setq yend (- yref (* seglen (sin reqangle)))) (setq endpt (list xend yend 0.00)) (command "pline" refpt endpt "") ) ) ) Thank you all
  5. Hi guys, There are a number of forum topics around the internet asking similar questions, each with good answers (e.g. Lee Mac here) but so far I haven't found an answer to my problem. What I would like to do is extract information from several long polylines (each on specific layers) and create a csv text file of the output, saved to the same directory and with the same name as the .dwg file. I need each row of the .csv file to contain the coordinates of one point on a polyline (X,Y,Z) but then additionally include a fourth 'label' column which would be in the format: [DrawingName]_[Layer] DrawingName = name of the .dwg file Layer = layer the polyline is on Example output: X,Y,Z,Dwg1_layer1 X,Y,Z,Dwg1_layer1 ;one row for each point on polyline X,Y,Z,Dwg1_layer1 .... X,Y,Z,Dwg1_layer2 ;this is the next polyline, on 'layer2' X,Y,Z,Dwg1_layer2 X,Y,Z,Dwg1_layer2 etc The label column is necessary as I need to combine information from many different files and the ability to identify and sort where the data came from is essential. I've attempted to modify existing 'extract XYZ' code that I've found around the internet but it seems to be beyond my current lisp skills . Any help you guys can give would be simply amazing!
  6. Hello Everyone! I am using vanilla AutoCad (R14-2012) and was wondering what the best solution would be for this problem (other than manually drawing each outline which I currently do!) I am looking to draw polylines along each point creating a polyline outline (perimeter) around the selected points. This in itself is quite difficult to do well(haven't found a great method yet) but there are multiple groups of points that I would like polylines around without selecting each individual group of points (in an ideal world). I realize that getting something 100% right is impossible and some manual editing (maybe a lot!) will be required. Attached is a sample of the points I usually have to work with. Test 05 2013.dwg I have done a bit of research and found some close solutions which I will post below. 1. Draw the polyline by point ID (can't remember author) (vl-load-com) ;;; to make a 3d polyline******************************************* (defun c:pol (/ adoc spc ss cnt plst 3dline) (setq adoc(vla-get-activedocument(vlax-get-acad-object))) (setq spc(vlax-get adoc (if (equal (getvar "cvport") 1) 'PaperSpace 'ModelSpace );_if ) );_setq (setq ss (ssget '((0 . "POINT"))));_select only point objects (if ss (progn (setq cnt 0);_loop counter (setq plst '());_empty list (while (< cnt (sslength ss)) (setq plst (cons(cdr(assoc 10(entget (ssname ss cnt))))plst));_make point list (setq cnt (1+ cnt));_incerase counter );_while (setq 3dline (vla-add3dpoly ;_make 3d polyline spc (vlax-safearray-fill (vlax-make-safearray vlax-vbDouble (cons 0 (1- (length (apply 'append plst))))) (apply 'append plst))) );_setq add 3dpoly );_progn );_if (princ) );_defun ;;; to make a 3d spline****************************************** (defun c:spl (/ adoc spc ss cnt plst 3dline stpt ept) (setq adoc(vla-get-activedocument(vlax-get-acad-object))) (setq spc(vlax-get adoc (if (equal (getvar "cvport") 1) 'PaperSpace 'ModelSpace );_if ) );_setq (setq ss (ssget '((0 . "POINT")))) (if ss (progn (setq cnt 0);_loop counter (setq plst '());_empty list (while (< cnt (sslength ss)) (setq plst (cons(cdr(assoc 10(entget (ssname ss cnt))))plst)) (setq cnt (1+ cnt));_incerase counter );_while (setq stpt (vlax-3d-point '(0.0 0.0 0.0)));_start pt for spline (setq ept (vlax-3d-point '(0.0 0.0 0.0)));_end pt for spline (setq cline (vla-addspline spc (vlax-safearray-fill (vlax-make-safearray vlax-vbDouble (cons 0 (1- (length (apply 'append plst))))) (apply 'append plst)) stpt ept ) );_setq add 3d spline );_progn );_if (princ) );_defun 2. Convex Hull (Lee Mac ftw) ;; Convex Hull - Lee Mac ;; Implements the Graham Scan Algorithm to return the ;; Convex Hull of a list of points. (defun LM:ConvexHull ( lst / hul p0 ) (cond ( (< (length lst) 4) lst ) ( t (setq p0 (car lst)) (foreach p1 (cdr lst) (if (or (< (cadr p1) (cadr p0)) (and (equal (cadr p1) (cadr p0) 1e- (< (car p1) (car p0))) ) (setq p0 p1) ) ) (setq lst (vl-sort lst (function (lambda ( a b / c d ) (if (equal (setq c (angle p0 a)) (setq d (angle p0 b)) 1e- (< (distance p0 a) (distance p0 b)) (< c d) ) ) ) ) ) (setq hul (list (caddr lst) (cadr lst) (car lst))) (foreach pt (cdddr lst) (setq hul (cons pt hul)) (while (and (caddr hul) (LM:Clockwise-p (caddr hul) (cadr hul) pt)) (setq hul (cons pt (cddr hul))) ) ) hul ) ) ) ;; Clockwise-p - Lee Mac ;; Returns T if p1,p2,p3 are clockwise oriented or collinear (defun LM:Clockwise-p ( p1 p2 p3 ) (< (- (* (- (car p2) (car p1)) (- (cadr p3) (cadr p1))) (* (- (cadr p2) (cadr p1)) (- (car p3) (car p1))) ) 1e-8 ) ) (defun c:test1 ( / i l s ) (if (setq s (ssget '((0 . "POINT")))) (progn (repeat (setq i (sslength s)) (setq l (cons (cdr (assoc 10 (entget (ssname s (setq i (1- i)))))) l)) ) (setq l (LM:ConvexHull l)) (entmakex (append (list '(0 . "LWPOLYLINE") '(100 . "AcDbEntity") '(100 . "AcDbPolyline") (cons 90 (length l)) '(70 . 1) ) (mapcar '(lambda ( x ) (cons 10 x)) l) ) ) ) ) (princ) ) 3. Create surfaces out of points using triangulation and limit the length of triangle then use bounding box to create polyline(hard to do in vanilla AutoCad). 4. Neat solution shown by Tyke (which I don't have the code for) 5. Possibly use multiple Bpoly commands, somehow getting the Bpoly command to recongnize points??? 6. Outsource? Anywho, if you guys have any ideas as to (too?) other methods/possible solutions/software programs/ANYTHING that could be of help that would be awesome! Thanks again for reading, Kablamtron
  7. I'm not a programmer. I'm looking for a function to extract from autocad all the coordinates of polyline vertex with autocad handle. I work with autocad map 2012 and 2013. Help in that regard would be appreciated.
  8. Good day, dear Forumers, just recently our company partially switched from AutoCAD to Inventor, my department however still works with AutoCAD. This however means that I am required to edit "2D" sketches made with inventor. After struggling a bit with converting the new format into something I can actually select, I've come across a new problem: once I dissolve the block which contains the main model I am unable to convert the resulting lines into Polylines. only 50% of the lines actually connect to their adjacent lines/arcs. This means I have to redraw half the model, which, as you may agree, is unacceptable. Quite lenghthy web-searches have not been fruitfull. FLATTEN was suggested but I don't have the expess tools installed and don't think I can convince the admin to do so. Also it seems that All lines/arcs in question already are on the same Z level, namely 0. Thanks in Advance, CP++
  9. So I am trying to make a site map for a building my buddy just bought. I found a lot map on the city's online database, cropped it to the area of his lot's block, and saved the image file. I then opened up a new autocad file and xreferenced the image. I know the front of his building on the site is 45' so I made a polyline that is the length of the facade over top of my xref image. Then I selected the image, used the scale command, selected one side of my polyline as a basepoint, used reference, entered 45' as the known length, and then selected the other end of the polyline. My image scaled but is now incredibly small. So small that the entine site isn't even 1". I keep trying but I'm doing something wrong somewhere. Can someone help me out?
  10. 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.
  11. 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
  12. 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.
  13. 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 !
  14. 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] -----------------------------------------------------------------------------------------------------
  15. 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,
  16. 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
  17. 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. :-)
  18. 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
  19. 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....
  20. 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.
  21. 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?
  22. 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?
  23. 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.
  24. 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
  25. 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
×
×
  • Create New...