Jump to content

Search the Community

Showing results for tags ';lisp'.

  • 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. Hi everyone, new here but following some troubleshooting for some time. I'm trying to learn lisp on my own (when time and opotunities are a thing) and trying to make use of it to improve my work to make it a "easy" task on the run. Can't code on my own yet but have been trying (poorly) to read it and change it to my needs, but I came to a wall and hope if anyone could help out. Enough about the boring me and more about what really drives people here What I can do with separated tasks: Part1: I have Block1 and Block 2.1, Block 2.2, Block 2.3, etc.... I draw a line from Origin to (multiselection) Destination. Part2: Get in memory a specific tag from Origin and insert it on another tag on the Destination, and repeat, repeat, repeat... I have 2 codes for that that I use from Lee Mac website and some other post from this forum (tnx for that guys). Now what I was trying to do: Draw the polylines from Origin-> (multiselection) Destination AND add that tag value simultaniously. But having a hard time figuring out how to change/add the code for both to work as 1. Any sugestions pls? this is the code I have right now on its working state (the repeated ";"' lines are just to help me distinguish each part of the other): (defun c:tags ( / sText) ;;;;;;;;;;;;;;;;;;;;;;;; (defun TCC_copyAttribute (source / blk ) (if (setq blk (entsel "\nSelect source block: ")) (setq sText (LM:vl-getattributevalue (vlax-ename->vla-object (car blk)) source)) ) ) ; (defun LM:vl-getattributevalue ( blk tag ) (setq tag (strcase tag)) (vl-some '(lambda ( att ) (if (= tag (strcase (vla-get-tagstring att))) (vla-get-textstring att))) (vlax-invoke blk 'getattributes)) ) ;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun TCC_pasteAttribute (dest / blk) (if (setq blk (entsel "\nSelect destination block: ")) (LM:vl-setattributevalues (vlax-ename->vla-object (car blk)) (list (cons dest sText)) ) ) ) ; (defun LM:vl-setattributevalues ( blk lst / itm ) (foreach att (vlax-invoke blk 'getattributes) (if (setq itm (assoc (vla-get-tagstring att) lst)) (vla-put-textstring att (cdr itm)) ) ) ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (while (TCC_copyAttribute "EQUIP_NAME") (TCC_pasteAttribute "EQUIP_NAME") ) princ() ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun c:drop (/ base ss i) (if ( and ( setq base ( car (entsel "\nSelect base block: ") ) ) (or (= "INSERT" (cdr (assoc 0 (entget base)))) (prompt "\nWrong selection, not a block.") ) (setq base (cdr (assoc 10 (entget base)))) (princ "\n...and blocks to connect to, ") (setq ss (ssget '((0 . "INSERT")))) ) ; ; ; (repeat ( setq i (sslength ss)) (command "_.PLINE""_none" (trans base 0 1)"_none" (trans (cdr (assoc 10 (entget (ssname ss (setq i (1- i)))))) 0 1)"") ) ) (princ) ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; test.lsp
×
×
  • Create New...