Jump to content

Search the Community

Showing results for tags 'autocad 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 6 results

  1. Hello, can anyone help me please with this topic? I have 9 layouts. I've inserted the same block to each layout. I want to change some attributes (the title of the drawing inside block) for each layout out of those 9. The Layout name is variable according to the number of project which I have at that moment (SCH 23-123_01 or SCH 23-125_01 for example), but the attribute values are always the same (for example "1 floor" for layout 1, and "section A-A" for layout 2 etc.) I'm newbie in AutoCAD LISP files, so I've tried something with ChatGPT, but it doesn't seems to work. (defun c:Updateattributes () ;; Define your block name and attribute tag (setq blockName "Pečat Marko Vukićević") (setq attributeTag "NAZIV CRTEŽA") ;; Define a list of attribute values corresponding to each layout (setq attributeValuesList '("OSNOVA JAME" "PRESECI VOZNOG OKNA" "OSNOVA VRHA VOZNOG OKNA I DETALJ MONTAŽNE KUKE" "DETALJ PRAGA VRATA" "TEHNIČKE SPECIFIKACIJE" "OSNOVA KABINE" "PRESECI OPREME I RASPORED KONZOLA" "PREGLED SIGURNOSNIH PROSTORA" "POGLED PRISTUPNIH STRANA")) ;; Start iterating through layouts (vlax-for (layout (vla-get-Layouts (vla-get-ActiveDocument (vlax-get-acad-object)))) (vla-activate layout) ;; Check if the block exists in the layout (if (tblsearch "Pečat Marko Vukićević" blockName) ;; If the block exists, update the attribute value (progn (vla-get-active (setq pspace (vla-get-ModelSpace layout))) (vlax-for obj (vla-get-Block pspace) (if (= blockName (vla-get-Name obj)) (progn ;; Find the attribute reference (vlax-for attrRef (vlax-invoke obj 'GetAttributes)) (if (= attributeTag (vla-get-TagString attrRef)) ;; Update the attribute value from the list (vla-put-TextString attrRef (pop attributeValuesList)) ) ) ) ) ) ) ) (princ "\nAttribute values updated for all layouts.") (princ) ) I've asked Chat GPT also if special characters like "č" "ć" "š" "ž" is possible to have in LISP, and I've got the positive answer, but I'm not sure that is true. Can someone please verify me this information as well? If someone has slightest idea in which direction I should go, It would mean a lot to me. Thanks in advance! P.S. In the attached file there is a sample of my drawings. Also I would like to rename another attribute inside block to be the same as the layout name, but that is on another level. Demo.dwg
  2. Hi everyone, we have already placed a block object in multiple locations. Now we need the same block in a converter rectangle array format. Is there any idea or Lisp program available?ilable
  3. Hello, I need help regarding to change the linetype scale of every line on a certain layer based on its individual length. Thank you.
  4. Hello Dear Friends, how to do the automatically offset in between two lines offset centerline for all. kindly find the attached for sample image with drawing. if anyone knows lisp please help me. I am using AutoCAD 2017 Thanks Amarendra HVAC sample Offset.dwg
  5. Dear All, I am completely new to autocad programming and want to take professional help or advice for getting the following task completed : 1. Import dxf file 2. Assign measurement data to premitives for tolerance. 3. Import point cloud. 4. Orient point cloud on cad entities. 5. Verify the dimension and generate deviation map 6. Generate inspection report. If someone can help me with this lisp code it will be of great help. Thanks in advance.
  6. Hi everybody I have few question about AutoLISP. before that, I would like to write few lines about my AutoCAD-related skills. I can use 2D CAD almost perfectly and I know some basic features of 3D. I know how to use excel or simply note pad to create lines of texts containing CAD command and use it in AutoCAD. but I don't know LISP at all. these are my questions: 1- As far as I know there is a unlimited works can be done by LISP, so I am wondering why there is not any complete website that provides and offers LISP programs! (I mean both free website and online AutoLISP shop) 2- I live in Iran and I want to know about using LISP prog in west countries. I want to know how you western people use this AutoCAD feature! 3- how much time it takes for me to learn this programming language? Thank you
×
×
  • Create New...