Jump to content

Search the Community

Showing results for tags 'length'.



More search options

  • 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...

Found 20 results

  1. Hello, I'm using a nice LISP which lists the segments length of a polyline you select, but I would just like to add shortest, longest and average below the text "total polyline length is..." like MIN: xx MAX: yy AVG: zz (defun c:Test (/ T_Entity T_Object T_Start T_End T_SegmentLengths T_Count) (if (and (setq T_Entity (car (entsel "\nSelect polyline: "))) (= (vla-get-ObjectName (setq T_Object (vlax-ename->vla-object T_Entity))) "AcDbPolyline") ) (progn (setq T_Start (vlax-curve-getStartParam T_Object)) (setq T_End (vlax-curve-getEndParam T_Object)) (while (< T_Start T_End) (setq T_SegmentLengths (append T_SegmentLengths (list (- (vlax-curve-getDistAtParam T_Object (setq T_Start (1+ T_Start))) (vlax-curve-getDistAtParam T_Object (1- T_Start)))))) ) (setq T_Count 0) (foreach T_Item T_SegmentLengths (princ (strcat "\nSegment " (itoa (setq T_Count (1+ T_Count))) ": " (rtos T_Item (getvar "LUNITS") 6))) ) (princ (strcat "\n\n ** Total polyline length is " (rtos (vla-get-Length T_Object) (getvar "LUNITS") 6))) ) (princ "\n ** Nothing selected or not a polyline.") ) (princ) ) Thx MINMAXLENGHTS.lsp
  2. Hai all, i have a lisp that gives me Length and Width of Rectangles that i select into a Table in cad. the table gives me the length and width as per incremental in size (eg:{ 1x2, 1.2x2, 2.1x3 } like wise) i have attached a screenshot of this, and also joins same size rectangle in one cell and shows number as 2. What i need help is to get the table not as incremental values but as i select (1st selection in first cell, 2nd in second cell like that). Please check the Screen shot. i don't know how to change the codes, the lisp is from a friend i got. so please help if possible , thanks in advance.. Please check the image ive uploaded too. the lisp code: (defun rectangle_dims (e / l a b) (setq l (mapcar 'cdr (vl-remove-if '(lambda (x) (/= (car x) 10)) e))) (if (and (or (= 1 (logand (cdr (assoc 70 e)) 1)) (equal (car l) (last l) 1e-8) ) (equal (distance (car l) (caddr l)) (distance (cadr l) (cadddr l)) 1e-8) (equal (mapcar '- (cadr l) (car l)) (mapcar '- (caddr l) (cadddr l)) 1e-8) (equal (mapcar '- (caddr l) (cadr l)) (mapcar '- (cadddr l) (car l)) 1e-8) ) (vl-sort (list (distance (car l) (cadr l)) (distance (cadr l) (caddr l))) '<) ) ) (defun C:RECDIMS (/ acObj acDoc space *error* ss e old r p1) (vl-load-com) (setq acObj (vlax-get-acad-object) acDoc (vla-get-activedocument acObj) space (vlax-get acDoc (if (= 1 (getvar 'cvport)) 'PaperSpace 'ModelSpace)) ) (vla-startundomark acDoc) ;;;;;; Error function ;;;;;;;;; (defun *error* (msg) (and msg (not (wcmatch (strcase msg) "*CANCEL*,*QUIT*,*BREAK*")) (princ (strcat "\nError: " msg)) ) (vla-endundomark acDoc) (princ) ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (if (setq ss (ssget '((0 . "LWPOLYLINE") (-4 . "<OR") (90 . 4) (90 . 5) (-4 . "OR>")))) (progn (repeat (setq i (sslength ss)) (setq e (ssname ss (setq i (1- i)))) (if (setq dims (rectangle_dims (entget e))) (if (setq old (vl-some '(lambda (d) (if (equal (list (cadr d) (caddr d)) dims 1e-8) d)) r)) (setq r (subst (cons (1+ (car old)) dims) old r)) (setq r (cons (cons 1 dims) r)) ) ) ) (if (and r (setq p1 (getpoint "\nSpecify table insert point: "))) (insert_table (mapcar '(lambda (a) (list (cadr a) (caddr a) (car a)) ) (vl-sort (vl-sort r '(lambda (a b) (< (caddr a) (caddr b)))) '(lambda (a b) (< (cadr a) (cadr b)))) ) p1 ) ) ) ) (princ) ) ;;The textheight in table depends on cannonscale (defun insert_table (lst pct / tab row col ht i n) (setq ht (/ 2.5 (getvar 'cannoscalevalue)) pct (trans pct 1 0) n (trans '(1 0 0) 1 0 T) tab (setq tab (vla-addtable space (vlax-3d-point pct) (+ 2 (length lst)) (length (car lst)) (* 2.5 ht) ht)) ) (vlax-put tab 'direction n) (mapcar (function (lambda (rowType) (vla-SetTextStyle tab rowType (getvar 'textstyle)) (vla-SetTextHeight tab rowType ht) ) ) '(2 4 1) ) (vla-put-HorzCellMargin tab (* 0.14 ht)) (vla-put-VertCellMargin tab (* 0.14 ht)) (setq lst (cons '("Width" "Length" "Pcs.") lst)) (setq i 0) (foreach col (apply 'mapcar (cons 'list lst)) (vla-SetColumnWidth tab i (apply 'max (mapcar '(lambda (x) ((lambda (txb) (+ (abs (- (caadr txb) (caar txb))) (* 2.0 ht))) (textbox (list (cons 1 (vl-princ-to-string x)) (cons 7 (getvar 'textstyle)) (cons 40 ht))) ) ) col ) ) ) (setq i (1+ i)) ) (setq lst (cons '("RECTANGLES") lst)) (setq row 0) (foreach r lst (setq col 0) (vla-SetRowHeight tab row (* 1.5 ht)) (foreach c r (vla-SetText tab row col (vl-princ-to-string c)) (setq col (1+ col)) ) (setq row (1+ row)) ) ) (princ "\nType RECDIMS to start the command")
  3. Lee Mac

    Line Length Calculator

    Version 1.7.0

    62 downloads

    This program will calculate the total length of Lines/Polylines/LWPolylines/Arcs/Ellipses/Circles/Splines with an optional filter. The Filter may be used to select only those lines that are on a certain layer, or perhaps have a certain linetype or colour. The results of the calculation can be displayed in an ACAD Table within the drawing, or written to either a CSV or TXT File. The Table-Style may be selected from the drop-down in the main dialog. Main interface The main dialogue box allows the user to filter lines by layer, linetype or colour and select the table style. Multiple selected items can filtered. A filter string may be entered to help the user quickly find the filter items that he/she requires. Options The options dialogue box allows the user to specify which object types should be included and the type of output, table in the drawing, CSV file or TXT file. Demo Function Syntax: LenCal For instructions on how to run the program see here. Any comments, criticism and suggestions are welcome. Either PM me directly, or reply to the original thread.
  4. Version 1.0.0

    35 downloads

    This AutoLISP file can be used to measure the total length or area of all polylines on a selected layer. Instructions on how to load and run this file in AutoCAD are given in this thread.
  5. Hello, I am new in coding lisp files. I worked with vb.net so this is very strange for me at this moment . I want to to select two points with different coordinates and to calculate difference between Z. I want to label that difference and to draw line with specific length under text. I did some coding which I pasted below but it wont draw line. I think that somehow I can not create pt2 and use it. Please help me because my head will blow... Code is below... THANKS (defun c:raz ( / p textloc p1 p2) (vl-load-com) (setq mspace (vla-get-modelspace (vla-get-activedocument (vlax-get-acad-object)))) (setq p (getpoint "Odaberite tacku terena: ")) (setq zt (rtos (caddr p))) (setq pomocni 1) (setq p5 (getpoint "Odaberite tacku toplovoda: ")) (setq zc (rtos (caddr p5))) (setq p1 (getpoint "\nOdaberi poziciju teksta.")) (setq y (rtos (car p1))) (setq x (rtos (cadr p1))) (setq z (rtos (caddr p1))) (setq thetext (vla-AddText mspace zt (vlax-3d-point (car p1) (cadr p1) [lz] ) "0.65")) (setq TTT (atof(cadr p1))) (setq p2 (list (+ TTT 2.24) (cadr p1) (caddr p1))) (setq YY (- x pomocni)) (command "Line" p1 p2 "") )
  6. Hello to all!... I'm again needing a help, are there a LISP that's possible get a length path from a polyline disposed over other lines? As a exemple attached has a drawing showing what exactly is this thread. The colored lines are the possible paths, each one has two texts (Name and Length) of possible path, over there has 3 lines showing the examples, using a "polyline" (I guess), I'll dispose over the path that I'm asking for the length, eg: Path 1, get 2 names and 2 lengths: PATH1 = 1010.1818 + 540.1862 => Total length =1550.368 Path 2, get 3 names and 3 lengths: PATH2 = 1010.1818 + 552.4334 + 379.7464 => Total length = 1942.3616 Path 3, get 5 names and 5 lengths: PATH3 = 1010.1818 + 552.4334 + 355.2488 + 548.7819 + 1333.2688 => Total length = 3769.9147 Is possible to create a table for each path with the names and length? Or one other way to get this informations using a polyline (I guess the best way) or selecting the path names? Is possible to link that 2 text as a feature of a polyline for each part and then get these informations? Thanks in advance!!!... Path length.dwg
  7. Hi, I want to draw a line on an angle from a known start point at a known length to a known finished plane (but not a known finish point or angle). Hopefully the attached pdf explains it better than I have here. I have turned on OSNAP to get the start point of my line then turned it off again to enable me to select the end point of my line without it snapping to the end or midpoint while it shows the length of my line on screen but this isn't completely accurate. Any ideas would be greatly appreciated? AutoCAD Line Drawing question.pdf
  8. Hi, I would like to know: are there any lisp that can calculate the DIP and the length of a 3d Polyline, in Front View or any other view?
  9. I got a some type of network and wants to count the block having the exactly same dimensions. This is because to make their division with respect to length. Example say there is total 27 number of blocks having the length 7 meter etc. But I am facing the problems, when I select the blocks, all have been selected. Find below the attached images of my method which I apply. I just first used the explode command then select the block select similar object and move to somewhere else. I need some help to solve this problem. I have used the command like list and area but I believe its time consuming and hope there is a simpler method to do this job.
  10. Hello guys, well i have a homework for the exams and i have no time, so i need your help. The question is, how i can measure the exact length of an arc (or a polyline) ? See the pic.
  11. adamskia1

    Total length of elements

    Hi, I don't know if it's good place to post it but finally there's a plugin in Autodesk exchange to count total length of elements. It names 'Tlen' and I've found it very handy. Cheers adam
  12. Dears, Someone knows how I can get a length of one arc or object (more than one) and construct a line after it with all lenghts separated for a specific space between each one. Thanks
  13. Hello Now that the problem with OS, XP, W7, 16bit, ... is solved with this little lisproutine, which I'm very happy for it, I discover another small limitation. I noticed that it only measures arc's and no lines. Is it possible to fix this problem? It would be great if it also can measures lines (at the same time time) Does anybody can help me with? Thx in advance Gr ARCRLVOOR_DimVoorSnijden.lsp
  14. Is it possibel to link all lengths to unit QTY in bom, and partlist, i know frame Generator is using G_L for length, i've tried using it in other parts but no result. also when doing multi body parts, how is it possibel to use parameter in assembly parts. i'm interrested in this because i do alot af cutlists, and it is quit tedious, doing it manual. so to sum up, general length parameter to use in assembly's and in multi body parts. some exsamples on how ypu do. i am a newbi. so sorry if this is a no brainer
  15. (AutoCAD LT 2013) If I draw a lengthy line across the screen, whatever scale I am drawing, the cursor seems to jump a few inches even when I am trying to be extra smooth with the mouse, I have updated my graphics card recently and no real change, what else can I do? Cheers, Lloyd
  16. 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.
  17. I receive drawings from others and do material take-offs. I need to learn how to make real measurements electronically in a drawing so I can stop having them plotted so I can use a scale. thanks! gsf
  18. Hey all, i was wondering if it is possible to automatically add letters/numbers after i type something? Say I have a table full of cups, i count these cups and i find i have 9. "9 cups" is what i want to see after i type "9" and hit 'Enter' Because "9" is shorter in horizontal length than "10" i want this text to automattically add itself in after ive typed in my information, otherwise i could have had another line of text placed after it, but because the infomation changes in horizontal length, it is easier to automatically fill in another word following.. I hope this is easy enough to understand, please if you have ANY ideas, please mention them!
  19. Hello all, I want to put a text about the polyline. Now I do the steps listed below. 1. polyline with Len2Fld.lsp read. 2. edit text for the street, material and diameter. 3. text-align with DTCurveV2 9.lsp. (Thank you very much Mr. Lee McDonnell.) It is a procedure if a large enough clusters with 50,000 inhabitants. The above-mentioned wish to edit in a single pass. -polyline-read length, choose the material and diameter (from a list) and finally to have an open field where you enter the street name or other (can be 2 to 3 fields to fill). Attach to a water network example I apologize for my English. I'm use Acad2008. Best Regards. Sample Water Network 3.dwg
  20. I am trying to dimension some of my house plans in inches to clarify some details for a subcontractor but am having some trouble. Attached is an example of what I am having difficulty with. I am running LDD AutoCAD 2002. I set the project and drawing to draw in Ft but when I use the Architectural dimensioning to get some ft and inches they do not match the length displayed in the properties. When I dimension using Decimal it shows it correctly unitless. As you can see in the attached the line is dimensioned as 40' 0" but the properties for the line indicates it as being 480 - apparently 480". How can I make the drawing units be feet so when I dimension in Architectural this particular drawing will show 480' 0" and the properties will also display a unitless 480. I have checked drawing settings, project settings, everything I can find to open and everything is set to Ft. I have found forum discussions about changing the scale, but that still isn't giving me a matching property length with the architectural dimension. I can of course just set a dimstyle to unitless and put the ' suffix, but I would like inches - everything has been drawn in respect to Ft. Any help would be greatly appreciated, thanks for everyone's time.
×
×
  • Create New...