Jump to content

Search the Community

Showing results for tags 'vla-object'.

  • 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, I want to prevent a layer from being plotted and I have found a few ways to do this but which way is the best? 1. (command "_.-layer" "p" "n" "LAYERNAME" "") 2. (defun PlotLayer2 (layerName bool / en output) (if (setq en (tblobjname "LAYER" layerName)) (progn (entmod (subst (cons 290 (if bool 1 0)) (assoc 290 (entget en)) (entget en))) (setq output T) ) ) output ) 3. (defun PlotLayer3 (layerName bool / acadObj doc layers layer output) (setq acadObj (vlax-get-acad-object)) (setq doc (vla-get-activedocument acadObj)) (setq layers (vla-get-layers doc)) (setq layer (vl-catch-all-apply 'vla-item (list layers layerName))) (if (not (vl-catch-all-error-p layer)) (progn (vla-put-plottable layer (if bool :vlax-true :vlax-false)) (vlax-release-object layer) (setq output T) ) ) (mapcar 'vlax-release-object (list layers doc acadObj)) output ) I know that it doesn´t play a big role in this example, but which is the best programming technique theoretically? Is it needed to release the objects in PlotLayer3? Thanks in advance!
×
×
  • Create New...