Jump to content

Search the Community

Showing results for tags 'insertblock'.

  • 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 Guys, I need a Help here i have created a autolisp for insert Blocks , in this i am showing invalid layers for user I.e block not available for that layers. But my problems is if same layer found more then one it will repeat for all same layers i don't want to show error for every same layers. Please help me (defun c:parkingblock(/ addblock ss acaddocument space i snm lnm pos) (vl-load-com) (defun addblock (sp pos nm lname en / b) (setq b (vla-insertblock sp pos nm 0.1 0.1 0.1 0.0)) (vla-put-layer b lname) (vla-delete en) ) (if (setq ss (ssget '((0 . "POINT")))) (progn (setq acadDocument (vla-get-activedocument (vlax-get-acad-object))) (setq space (vla-get-modelspace acadDocument)) (repeat (setq i (sslength ss)) (setq snm (vlax-ename->vla-object (ssname ss (setq i (1- i))))) (setq lnm (vlax-get snm 'layer)) (setq pos (vla-get-Coordinates snm)) (cond ((= lnm "P_SEM_P") (addblock space pos "937" "P_SEM_P" snm)) ((= lnm "P_ILL_P") (addblock space pos "950" "P_ILL_P" snm)) ((= lnm "ALB_P") (addblock space pos "968" "ALB_P" snm)) ((= lnm "P_TEL_P") (addblock space pos "980" "P_TEL_P" snm)) ((= lnm "ZSD_P") (addblock space pos "953" "ZSD_P" snm)) ((= lnm "DIS_SOST") (addblock space pos "926" "DIS_SOST" snm)) (t (princ (strcat "\nBlock not found for Layer: " lnm)));; Problem ) ) ) ) (princ)) Regards, Ganesh
×
×
  • Create New...