Jump to content

Search the Community

Showing results for tags 'unlocked layers'.

  • 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. Hello Everyone, I have a lisp that I would like to use but I do not want it to affect locked layers. Could someone point me in the right direction on how to modify this lisp? I'm starting to get familiar with lisp programming but this code looks different than what I have been using. This lisp simply takes all text and puts it on a new layer called "Layer"-Text. I have one layer of text that I do not want to change. I'm hoping to just keep the layer locked while the lisp runs. As always, any help is greatly appreciated. Also does anyone know any good references on lisp for AutoCAD? ToText.lsp (defun c:ToText (/ la name lk ss new);; Move all *Text and *Leaders to a text layer, matching primary layer (eg. ALAN -> ALAN-TEXT);; Includes objects on locked layers;; Layer created if doesn't exist (also takes on color of primary layer);; Alan J. Thompson, 08.19.10(vl-load-com)(vlax-for l (setq la (vla-get-layers(cond (*AcadDoc*)((setq *AcadDoc* (vla-get-activedocument (vlax-get-acad-object)))))))(or (wcmatch (strcase (setq name (vla-get-name l))) "*-TEXT,*$*")(if (setq ss (ssget "_X" (list '(0 . "*LEADER,*TEXT") (cons 8 name))))(progn(and (setq lk (eq :vlax-true (vla-get-lock l))) (vla-put-lock l :vlax-false))(or (tblsearch "LAYER" (setq new (strcat name "-TEXT")))(vla-put-color (vla-add la new) (vla-get-color l)))(vlax-for x (setq ss (vla-get-activeselectionset *AcadDoc*))(vl-catch-all-apply (function vla-put-layer) (list x new)))(vla-delete ss)(and lk (vla-put-lock l :vlax-true))))))(princ))
×
×
  • Create New...