Jump to content

Search the Community

Showing results for tags 'write-line'.

  • 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 1 result

  1. SOOooo..... i've been tooling around with getpoints and "cond" but i can't seem to make this work other then REALLY primitively. the 2 forums i have found on the matter are: HERE AND HERE i am not sure if it's bad karma to link to another set of forums, but for research sake, i think these should all be linked. The main problem i think most people have when they come here is they can find 90% of what their looking for in google, but have a hard time personalizing everything to the format they are looking for. I am afflicted with the same. i can just copy these guy's code and have it work halfway, but then ti's not really helping me out, since i have to go back and format it anyways. And i swear i google and try out 40 or 50 different way to code before i come to you guys. The guilt from the free coding i'm contracting from your guys really builds up. I hope i'm not seeming TOO much of a freeloader when i ask these questions, you guys really are the best. NOW, on to what i have, and what i am going for. Basically i want to pick a point, have the point named, and have that be put into notepad with formatting. such as this: (command "whatever") prompt for file name (location doens't matter to me, can be "c:\" or "user\desktop" (pick point) and the read out will have: PT1 111.1111 222.2222 333.3333 PT2 444.4444 555.5555 666.6666 and so on, and have the "pt#" increase with all the points. Also, the tricky part is i need "5 spaces" between the numbers without using a "\t". which is what i'd LIKE to use, but that's just not the way my cookie is crumbling today. i would like to thank anybody who has made it this far and hasn't moved on. Now code time: (defun c:P2FILE (/ fname file text pt p2) (setq fname (getkword "\nenter filename")) (setq file (open fname".txt" "w")) (setq pt1 (getpoint "\nPICK POINT")) (setq x (rtos (car pt1))) (setq y (rtos (cadr pt1))) (setq z (rtos (caddr Pt1))) (setq text (strcat "PT1 "x" "y" "z)) (write-line text fname) (close file) ) Now things i know are wrong but have no clue how to fix: "getkword" i'm sure is jut the wrong command, since putting in every variable is a ridiculous notion. and my "strcat" doens't number up with the points i pick, but i have no idea how to even START making that "cond" Thanks in advance for any help!
×
×
  • Create New...