Search the Community
Showing results for tags 'layer change'.
Found 10 results
VBA change layers
katto01 posted a topic in .NET, ObjectARX & VBAHello, I am trying unsuccessfuly to switch layers from EXCEL. This is my code: Please advise Thanks Public Sub MISKO() Dim ACAD As AcadApplication On Error Resume Next Set ACAD = GetObject(, "AutoCAD.Application") Call ACAD_SELECT_LAYER("BIBI") End Sub Public Sub ACAD_SELECT_LAYER(A$) Dim ACAD As AcadApplication Dim objLayer As AcadLayer Dim acadDoc As AcadDocument Set ACAD = GetObject(, "AutoCAD.Application") 'Get a running instance of the class AutoCAD.Application Set acadDoc = ACAD.ActiveDocument Set objLayer = acadDoc.Layers(A$) ‘ < supposed to select this layer passed by A$ End Sub
Change Muliple Layer at once
Halb10 posted a topic in AutoLISP, Visual LISP & DCLHi there, here a thing I want the do with LISP: I want to change multiple Objects with different Layers, that each Layer change to a different Layer. Example: Select entities with (ssget "_:L" '((8 . "Layername1, Layername2, etc"))) Now change Layer: Layername1 → 1_Layername1 Layername2 → 1_Layername2 I don't want to select each entity and than change its Layer. I want to do all entities at the same time with one command.
LISP | IF Conditions | Copy to Existing Layer
bluebravo posted a topic in AutoLISP, Visual LISP & DCLGoal: LISP that copies selected objects to existing layer, using layer name shortcuts. Example: 1. Select objects 2. "CX" (Lisp command) asks for layer to copy into 3. "1CC" (Shortcut) Copies to actual layer name 1_COLS-CONT OR "2CC" copies to actual layer name 2_COLS-CONT, etc. I have the following LISP to start, and I just need to add all of the conditions for accepting a layer name shortcut and changing the layer to the corresponding one. I have a large number of layers, and so one lisp command for each seems too much. I understand that I would need multiple if conditions, but I need help with the actual code (fairly new to lisp). Thank you for your time! ;FILENAME cx.LSP ;THIS LISP ROUTINE copies selected objects in place then prompts ;the user to change the layer of previus objects selected. ;BY Ryan 3/5/02 (defun c:cx() (setq ss1 (ssget)) (setq laycx (getstring "Destination layer for copy: ")) (command "_copy" "P" "" "@" "@") (command "_chprop" "P" "" "la" laycx "") )
Change block color through block table
mechaneco posted a topic in AutoCAD Drawing Management & OutputHi everybody, I wanted to know if there is a way I can control the layer a block is in through the block table, so if I change a set of parameters through the table, one of them could be "Layer" and that way I can change it appereance. I want to avoid visibility parameters, as there are too many permutations of blocks for that. Thanks for the help in advance!
Is there a way to remove layers in bulk?
steelcityj20010 posted a topic in AutoCAD Drawing Management & OutputI have a series of drawings that I am now in charge off and three or more people have worked on it. I have changed all of the layers on the drawing to my layers. but there is 50 or more layers from other people editing these drawings. is there any way to remove the layers at once or can I only remove them one at a time with LALDEL? I appreciate any help.
Layer of Attribute Block entities
Antas posted a topic in AutoLISP, Visual LISP & DCLHi somebody please help me with a lisp program, which changes the layer of all tags in an attribute block into single layer selected by the user.
Update Block layer with Excel input
jmb789 posted a topic in .NET, ObjectARX & VBAHi all, I'm currently using AutoCAD 2014. I'm use to using AutoCAD but have never used VBA or AutoLISP before. Really just found out about them from doing some research on the internet and hoping for some help with my dilemma. I have a floor plan already drawn and each individual room already has a separate hatch created as a block with a unique identifier. What I would like to be able to do is somehow make the layer of the block change to represent the percent completion of each room. I would ideally like to just be able to make an Excel spreadsheet that contains in column A the block title like Kitchen, Bath Room 1, Living Room, etc. and column B would contain the layer I want to move it to. So when I change column B from 20 to 30 the layer updates automatically. A couple different people will be inputting to the spreadsheet which is why I want it to be able to the update automatically when needed. My floor plan contains about 60 different spaces (blocks) and has about 10 different colors (layers) to represent the percent completes. I'm not really sure how to go about this but I'm very much willing to learn. Eventually the drawing will grow to have over 300 individual blocks and around 12 layers. So you can see the amount of effort it would save versus selecting each block and changing it's layer individually. Thanks, JMB
Layer Properties not updating properly
Liltygar posted a topic in AutoCAD Beginners' AreaWe have changed the color, line weight and description of specific layers. We used to use Layer state to update the layers, now we use the design center. Changes made in Example 1. Example 2 has the wrong layers - so Design center is open, layers from Example 1 are dragged and dropped into Example 2. Layers still wrong. Example1.dwg This is the Example 1.
Change into current layer Even Block object also with support of EXPLODE
akgbmb posted a topic in AutoLISP, Visual LISP & DCLIs there any lisp to do the following? > Select objects to be changed to the current layer > if selected object is block then EXPLODE and change into current layer > Select objects’s color change into ByLayer
One lay different color objects so how can i change same color object to another lay
121madhu posted a topic in AutoLISP, Visual LISP & DCL