Jump to content

Search the Community

Showing results for tags 'delete attributes'.

  • 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. So I have a library full of exported blocks (wblock) Now I wanted to add an attribute to those blocks with the part name so I can use eattext. (since we use 2d blocks and they have multiple views I couldn't use the block names) And since I am not working in a block but a dwg file of and exported block. I couldn't use any standard attribute lisps. I can't even use attedit since that asks for a block too. So while I was making this post I figured it out by myself so here is the code: To add an attribute to the center of a drawing or a block if your in the block editor: (command "-Attdef" "I" "P" "L" "" "partnr" "enter part number" "partnr" "style" "style1" (getvar "viewctr") "0") to delete the old attribute ( I modified a block delete routine: (defun C:delblk3 (blk / SS FILTER SSLEN ENT) (progn (setq FILTER (list (cons 0 "ATTDEF") (cons 2 blk) ) SS (ssget "_X" FILTER) ) (if SS (progn (vl-load-com) (repeat (setq SSLEN (sslength SS)) (vlax-invoke-method (vlax-ename->vla-object (ssname ss (setq SSLEN (1- SSLEN)))) 'Delete) ) ) ) ) ) (c:delblk3 "partnr") ;; call it with this line. Sharing it because 90% is from here anyway, I hope someone finds it helpfull
×
×
  • Create New...