Jump to content

Search the Community

Showing results for tags 'pline'.



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

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Found 13 results

  1. Dear friends, how long I was here!... I need some help, if someone knows any lisp to convert Lines in 3D to 3D Polylines. The goal about it is to do a Pipeline tubes in 3D way. Thanks a lot for any help. CafeJr...
  2. Hi, I have just started using autocad two weeks ago and I'm trying to make my first script file, a joined, closed polyline that is a rectangle. The code is below: _pline -15000,0 15000,0 15000,-1000 -15000,-1000 c (there is a space after the 'c' and a return after the line) When I run, it creates a trapezoid and I'm not sure why (it is joined and closed). The first and second points are in the correct locations. The third point is not (it's at (15000,-1160.7425)) and the fourth point is not (it's at (-15200,-1160.7425)). All the angles from the XY plane are 0, so none of them are going into the z dimension. Also, the problem vanishes when I remove the negative signs from the y coordinates. Does anyone know what's going on and can provide a fix? Thanks!
  3. I have written a little small command to run revision cloud on last object (i.e. rectangle, pline, circle...etc) and it works fine but I was trying to figure out a way to run that custom command after drawing my rectangle or pline. Instead of having to type the shortcut immediately after, every time. Here is custom rev cloud command I am referring to, this one works flawlessly when run as a standalone after I finish drawing said object that it will be used on but I would like to combine.. see below: (DEFUN C:RCL () (COMMAND "REVCLOUD" "O" "L" "") (COMMAND "-INSERT" "REV-TRI" PAUSE "" "" "") (COMMAND "EXPLODE" "L" "") (COMMAND "DDEDIT" "L" "") (PRINC)) Here is rectangle command with the attempt to run custom afterwards. It works but looks buggy and most likely written wrong. (take it easy ive been learning): (DEFUN C:RECL () (COMMAND "RECTANGLE" PAUSE PAUSE) (C:RCL) (PRINC)) Here is my attempt at the pline one but I dont even know where to start so it allows user unlimited points then hitting "c" for close afterwards AND THEN running the custom command: (DEFUN C:PLR () (command "_.PLINE") (coMmand pause) (C:RCL) (PRINC))
  4. Strange issue; didn't see any other like it in the forum and similar found online didn't have any fixes that worked here. Colleague has AutoCAD 2015 for Mac OSX 10.8.5 (*I know, I know...WHY??) Trying to draw a Pline. We get the + sign when choosing starting point, then nothing as you stretch any direction, nothing when clicking a second point or multiple points or ending command. Tried to change width to 4 - same results. Tried the following settings: PLINETYPE set to 0 and 1 PLINEWID set to 0 and 1 Layer is ON and UNFROZEN. LINE command works. Same drawing does just fine on two Windows PCs using AutoCAD Map 5 and AutoCAD 2000. Hope someone can help. Thanks...
  5. Hi all, I'm familiar with the pedit command to turn a spline into a polyline, but I'm wondering if there's a way to change all Splines to Polylines automatically to save a hell of a lot of time. I've tried loading "Spline-to-Pline" LISP file, It's pretty shocking for keeping a reasonable tolerance and resolution at the same time as I need a line/arc length of at least .3mm for our CNC laser cutter.. Any thoughts? (See attached ACAD file with Splines I'm converting) Cave AUTOTRACE.dxf
  6. Imagine the magenta vertical line is a poly-line with a preset global width assigned to it already. Is it possible to achieve what is depicted in following screenshots? From this: To this?
  7. Hi everyone, Just trying to pass a list of points to a "pline" command. The problem is num of points is initially unknown, though being calculated within a routine. The following code (as smth to start with) evolves known num of points. (defun c:pltest6 () (setq pts (list '(0 0) '(0 10) '(10 10) '(10 20) '(20 20) '(20 30) '(30 30))) (setq ptqty 7) (setq ptnum 0) (command "pline" (car pts) (pt_retr pts) (pt_retr pts) (pt_retr pts) (pt_retr pts) (pt_retr pts) (pt_retr pts) "" ) ) (defun pt_retr (lst) (setq ptnum (1+ ptnum)) (repeat ptnum (setq lst (cdr lst)) ) (setq pt (car lst)) ) Repeat/foreach don't do, 'cause they return the value of the last iteration.. Now my Q is, is it possible to modify the code above to use loop instead of repeat one and the same line (moreover, unknown number of times ), OR some other approach would rather fix the task? Thank you in advance, Dmitro
  8. Erickson1026

    Poly lines in lisp

    Hello all, Somewhat new at using lisp for a very specific function. Here's the issue, I have a lisp routine that needs to save a layerstate, set a specif ic layer current, lock the others, then run the poly line command, exit the pline command, then reset back to the original layer state after running the pline command. Here's the code so far. The pline is erroring out before I get to the layer state which are still being developed. So main question, can I get the pline command to work properly first. LOA.LSP 2012 by David W. Erickson ;;; DESCRIPTION ;;; ;;; This function turns on a-wall-e layer and locks all non Ioffice layers, sets io-area-indv current and starts the polyline command. (DEFUN C:LOA (/ LAYER OFF ) (COMMAND "-LAYER" "A" "S" "DAVE" "" "" "" "" ) (SETQ pT1 (GETPOINT "\nSelect the 1st POINT. ")) (command "-layer" "fr" "*" "th" "io*" "th" "a-*-e" "lo" "*" "unlock" "io*" "set" "io-area-indv" "fr" "a-anno*" "th" "_close_door" "u" "_close_door" "off" "a-door-e" "OFF" "A-FLOR-STRS-E" "OFF" "IO-SEC-SPCS" "OFF" "A-EQPM-E" "") (command "pline" pt1 pause ) (COMMAND "-LA" "A" "R" "DAVE" "" "" "" ) (COMMAND "-LA" "A" "D" "DAVE" "" "" "" ) (princ) ) Thanks in advance. Dave
  9. I'm trying to filter out plines that are duplicates of each other from a list. I've been trying to compare 1 point in the first pline against the list of points from the other plines. They will only share a point if they are identical for this use. I've been trying to work this out on my own but it has becaome a complete mess and I know there must be a simpler way. This code works but has no way of checking the last pline. comparepts is a list of lists of the points on the plines nubpaths is a list of the pline entity names Help if you can please. (setq compctr1 0 ctr 0 numnubs (length nubpaths) nlist (list) ) (while (< compctr1 (- numnubs 1)) (setq compctr2 (+ compctr1 1)) (while (and (< compctr2 numnubs) (not reject)) (setq complngth (length (nth compctr2 comparepts))) (setq compctr3 0) (while (and (< compctr3 complngth) (not (equal (car (nth compctr1 comparepts)) (nth compctr3 (nth compctr2 comparepts)) 0.00009))) (setq compctr3 (+ compctr3 1)) ) ;_ end of while (if (/= compctr3 complngth) (setq reject T) ) ;_ end of if (setq compctr2 (+ compctr2 1)) (if (= compctr2 numnubs) (setq nlist (append nlist (list (nth compctr1 nubpaths)))) ) ) ;_ end of while (setq compctr1 (+ compctr1 1) reject nil ) ) ;_ end of while
  10. 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?
  11. howdy, I found this code: (defun c:ppav () (vl-load-com) (setq *model-space* (vla-get-modelspace (vla-get-activedocument (vlax-get-acad-object)))) (setq obj (vlax-ename->vla-object (car (entsel)))) (setq c (vlax-get obj "Coordinates") i 0) (repeat (/ (length c) 2) (setq x (nth i c) y (nth (1+ i) c)) (vla-addpoint *model-space* (vlax-3d-point (list x y 0.0))) (setq i (+ i 2)) (setq temp (osnap (list x y) "mid")) ; I added this (command "point" temp) ; and this ) (princ) ) and added the two lines to try and get points set on the midpoints of the pline segments....but it does not work as intended. Some midpoints are set on the wrong segment and 1 extra point is being set. Can Anyone Help? thanks Ray
  12. Hello, I am looking for a lisp that would add a block (ex. arrow) to the each endpoint of a pline and align it with that pline. Any ideas? Thank you in advance.
  13. Hi everyone! I'm kinda new in this LISP world and I'm having some trouble on this project of mine. Here we go: I need a LISP to draw a PLINE and create a text with the PLINE's area. The area is always different and I don't have the points to draw the PLINE, so I have to draw it with the mouse and when I finish I want to have the area value in a text placed inside that PLINE (I can place it with a mouse click, but I don't want to have to write the area). This is the code I already wrote: I would appreciate any help! Thanks!
×
×
  • Create New...