AutoCAD VB :: All Layers Locked Except Active Layer Chosen In Combobox?

Dec 21, 2012

I have a form with a combobox and a commandbutton.

 All layers in the layermanager must be locked except the active layer chosen in the combobox. I try it with this code but it’s not the right solution.

Private Sub CommandButton1_Click()Dim layer As AcadLayer'check if all layers are lockedIf layer.Lock = False Thenlayer.Lock = True'make the layer selected in the combobox currentThisDrawing.ActiveLayer = ThisDrawing.Layers.Item(ComboBox1.Text)End SubPrivate Sub UserForm_Initialize() Dim layerColl As AcadLayers Dim layer As AcadLayer Dim LayList As String ' all layers locked For Each layer In ThisDrawing.Layers If layer.Lock = False Then layer.Lock = True End IfNext 'fill combobox Set layerColl = ThisDrawing.Layers For Each layer In layerColl ComboBox1.AddItem layer.Name Next End Sub

 2. When I choose the for next method to lock all layers (40 layers) it’s very slow.

View 4 Replies


ADVERTISEMENT

AutoCad :: How Layer Locked In Turn Not Affecting Other Layers

Apr 27, 2012

I have a question regarding AutoCAD 2012 and when it comes to locking layers.

When working on the basement layer I would like to see that layer locked in turn not affecting my other layers, ie: my house/garage/second-floor.

View 9 Replies View Related

AutoCAD .NET :: List Layers In ComboBox Dropdown

Mar 4, 2013

Any examples on how to list all the layers of a current drawing and populate a ComboBox on a form with that list. It seems pretty simple, i'm just gonig through the .NET Developer guide now but was hoping there was a quicker solution.

View 4 Replies View Related

AutoCAD VB :: How To Make The Selected Value In Combobox Current Layer In Drawing

Dec 19, 2012

Private Sub UserForm_Initialize() Dim layerColl As AcadLayers Dim entry As AcadLayer Dim LayList As String Set layerColl = ThisDrawing.Layers For Each entry In layerColl ComboBox1.AddItem entry.Name Next End Sub

I have a form with a combobox. That combobox is filled up with all layers in a drawing. (see above)

Now I want to make the layer that I have selected (value) in the combobox the current layer in my drawing.

How can i make it current?

View 2 Replies View Related

Photoshop :: How To Select Locked Layer When Too Many Layers Overlapping

Sep 6, 2013

How to select a locked layer when you have too many layers overlapping?
 
I know I can select all the layers, lock them and unlock them. But I can't lock/unlock all layers when some layers are hidden. I'll have to dig in to unhide those layers. But then I don't want to unhide all layers, because it will make changes to my design that I wouldn't know.
 
Is there a smart way to find/select the lock layer?

View 3 Replies View Related

AutoCAD 2010 :: Turning Off A Xref Layer / Active Layer

May 3, 2013

Is there a macro or lisp file that allows you to click on a element in the xref or active file and turn it off?

View 5 Replies View Related

AutoCAD .NET :: Turn Off / On All Layers In Active Document

Jan 5, 2014

I would like to turn off all the existing layers in active document. I have found in developer's guide how to turn off one layer with specified layer name but can not apply it on all layers with any layername.

I tried to get all the Object ID's in layer table and then for each object turn layer off but seems that it does not work.
 
<CommandMethod("FilterLayers")> _Public Sub FilterLayers()'' Get the current document and databaseDim acDoc As Document = Application.DocumentManager.MdiActiveDocumentDim acCurDb As Database = acDoc.Database'' Start a transactionUsing acTrans As Transaction = acCurDb.TransactionManager.StartTransaction()'' Open the Layer table for readDim LayerTable As LayerTable = acTrans.GetObject(acCurDb.LayerTableId, OpenMode.ForRead)Dim LayerTableRecord As LayerTableRecord = acTrans.GetObject(LayerTable.ObjectId, OpenMode.ForWrite)For Each ObjectId In LayerTableLayerTableRecord.IsOff = TrueNext'' Save the changes and dispose of the transactionacTrans.Commit()End UsingEnd Sub

View 3 Replies View Related

AutoCAD .NET :: Read Layers In Active Document From External App?

Jul 22, 2012

I have an external drawing processor and one of the functions is to read the layers in an AutoCAd drawing and if the name matches freeze/thaw it. With modifications over the years I have had it working with 2002 through 2008. Now I'm getting errors. When I tru to use the Interop, I get "Call Rejected by Callee" errors, when I use the

ApplicationServices method to get the application and active document, I getI" Method 'GetEnumerator' in type 'Autodesk.AutoCAD.DatabaseServices.LayerTable' from assembly 'Acdbmgd, Version=18.2.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation." errors.

Basically for the interop method I use this

Imports Autodesk.AutoCAD.Interop Public Function GetAcadApp() As AcadApplication Dim progID As String = My.Settings.strAcadProgID Dim acApp As AcadApplication =

[Code]......

View 2 Replies View Related

AutoCAD .NET :: Can't Snap Locked Layers

May 12, 2012

I need an overrule that can not snaps object in all locked layers. How to do that.

View 9 Replies View Related

AutoCAD Map 3D :: 2 Layers Named 0 - Not Locked Down

Apr 9, 2013

In my layer prop manager, I have 2 layers with the name "0". How is this possible? Also, I'm trying to move the lines/polylines on either one of these layers and it won't move because it's locked. But when you look on the layer manager, BOTH of the 0 layers are not locked down.

View 5 Replies View Related

AutoCAD VB :: Why Does Locked Layers Not Fading With VBA

Dec 29, 2012

I have this application: It's a userform with a combobox filled up with all layers. There also are 2 commandbuttons and a label.When I apply the command button all the layers except the selected layer in the combobox lock. That's good.This is the problem:

Normaly when I lock a layer it is fading (laylockfadectl 80). But when I lock layers with this vba code it doesn't fading locked layers.

Option ExplicitPrivate Sub cmbx1_Change()Label1.Caption = cmbx1.ValueEnd SubPrivate Sub cmdAPPLY_Click()On Error Resume Next 'handle exceptions inline
Dim objlayers As AcadLayersDim objlayer As AcadLayer
Set objlayers = ThisDrawing.Layers 'make the layer selected in the combobox current
[code]....

View 1 Replies View Related

AutoCAD .NET :: Setting Active Layer Filter

Mar 23, 2009

I'm trying to set the active Layer filter. I tried myDB.LayerFilters.Root.Name = "Filter1" but it wouldn't work.

View 9 Replies View Related

AutoCAD LT :: Where To Set Fade Control Of Locked Layers

Dec 10, 2013

where is the setting to change the Fade Control when you lock a layer?(It is not the same as the Fade Control of the External References in the Display tag of the Options dialog.  I know that one and I am aware of this one.)

The one that I want to know is of the locked layers.  When I lock a layer, the objects in the layer fade.

View 5 Replies View Related

AutoCad :: No Dotting Of Locked Layers While Selecting?

Sep 7, 2012

locked objects get selected, but nothing acts on them. that is i do see them getting dotted while i selected all objects on other unlocked layers. is there way that locked layers don't get dotted while selection? just like in sketchup?

View 5 Replies View Related

AutoCAD .NET :: Select All Block Only On No Frozen And Active Layer

Jul 12, 2012

Dim editor As Editor = Application.DocumentManager.MdiActiveDocument.Editor
Dim db As Database = HostApplicationServices.WorkingDatabase
Dim tr As Transaction = db.TransactionManager.StartTransaction()

[Code].....

the only prob is : I want selec all block but not the block on layer frozen, off or not visible...

I can check all layer stat on each block.. (i do that already for check each block (name) but i want a solution more easy.)

View 5 Replies View Related

AutoCAD .NET :: Event For Change Active Layer In Document

Aug 24, 2012

Is there event for change current (active) layer of document?

(it's not Database.ObjectModified - it's not raised).

I tried to do it with binding as:

public void Initialize()
{
var layerList = Application.UIBindings.Collections.Layers;
layerList.PropertyChanged += new PropertyChangedEventHandler(LayerList_PropertyChanged);

And -= in Terminate, but... Autocad 2012 chashed _sometimes_!!!

Impossible to understand when it happened. So I reject this way. Is there other way to handle this event?

View 2 Replies View Related

AutoCad 3D :: Extruding Ignoring The Actual Active Layer

Aug 23, 2011

There is a method for extruding ignoring the actual active layer, so the extrussion result is the same as 2D base object...(and is not created in active layer) i forgot how coul i do this, is really useful

After Googling a lot i didn't get any result

View 3 Replies View Related

AutoCAD 2010 :: Don't Want Objects On Locked Layers To Be Selectable

Aug 6, 2009

I have made gridlines and put them on a locked layer. I want to be able to see them and snap to them, but I don't want to select them. Their selectability is hindering my ability to select objects on other layers. Is there any way to make lines on locked layers not selectable? (I don't like the Autocad standard grid.)

View 9 Replies View Related

AutoCAD 2010 :: Adjust Transparency Of Locked Layers?

Apr 16, 2012

how to adjust the transparency of locked layers?  Also when I isolate a layer the other layers appear semi transparent, is it the same setting to adjust this transparancy as well?

View 2 Replies View Related

AutoCAD VB :: Command (macro) To Unlock All Locked Layers?

Aug 16, 2011

Create a command (macro) to unlock all locked layers and remove the fade effect.  I know how to unlock them by using the command LAYULK, selecting the entities on the locked layer.  I have been trying to automate the command so I don't have to select entities. 

View 4 Replies View Related

AutoCad :: Create New Layer It Comes In Locked

Sep 19, 2013

I isolated layers to clear out a drawing, since then I have had nothing but hassle with locked layers, No matter how many times I unlock them, they lock up again, if I create a new layer it comes in locked, if I change a line to a differant layer it locks up, I have tried creating a few simple layers, then copying and pasting the layout into a new drg file, still the problem exists, it is costing me a lot of time having to keep doing this.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Remove Blocks In Locked Layers?

Jun 25, 2012

The routine below delete group of blocks by name, but if the blocks are on locked layers, these are not removed.

How can improve the lisp?

(defun c:deleteblock (/ rn ss)(defun Jd (realname) (setq ss (ssget "x" (list '(0 . "INSERT")(cons 2 (strcat "`*U*," REALNAME))))) (mapcar '(lambda (x) (if (not (eq REALNAME (vla-get-effectivename (vlax-ename->vla-object (cadr x))))) (ssdel (cadr x) ss))) (ssnamex ss))(setq ss_len (sslength ss)) (command "_erase" ss "") ) (setq rn (vla-get-effectivename (vlax-ename->vla-object (car (entsel "
Select the block you want to delete:"))))) (jd rn) (princ (strcat "
" (itoa ss_len) " Blocks called "" rn "" has been deleted")) (princ) )

View 9 Replies View Related

AutoCAD .NET :: Dealing With Objects In LOCKED Layer?

May 1, 2012

I am trying to assign objects (only in UNLOCKED layers) with a new layer.So basically, the user will select all the objects in the drawing.

After selecting (ex. press enter after window selecting), only objects in UNLOCKED layers will have a new layer.

Following is the code I am using...But I keep getting eOnLockedLayer exception.How should I handle this issue?
 
using (Transaction acTrans = acCurDb.TransactionManager.StartTransaction())
{
PromptSelectionOptions pSelOpts = new PromptSelectionOptions();
pSelOpts.MessageForAdding = "Select all objects";
PromptSelectionResult pSelRes = acDoc.Editor.GetSelection(pSelOpts);
if (pSelRes.Status == PromptStatus.OK)

[code]....

View 3 Replies View Related

AutoCAD 2010 :: Layer Locked And Turned Off

May 29, 2013

I've locked a layer and this one went off, too. This is AutoCAD 2010, it's because the program?

I want my layer ON but locked, what can I do?

View 2 Replies View Related

AutoCad 2D :: Locked Layer Snap Points

May 4, 2012

I'm messing around with some commands and I'm currently exploring laylockfadectl/layiso.

They both work just fine of course, but I was wondering if its possible to make ACAD ignore snap points on the locked layers?

View 1 Replies View Related

AutoCad :: Layer Combo Control Is Locked?

Aug 3, 2011

My ACad2006 Layer Combo Control bar appears to be locked. It will only show the current layer and will not show the layer of an object that is selected with the pickbox. I must have accidentally made a change somehow, but don't know how to undo this.

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Create Blocks With Some Of Attributes On Locked Layers

Jan 4, 2012

i am trying to restrict users from modifying certain attributes in a block,i can create the blocks with some of the attributes on locked layers, but then autocad pops up an annoying alert box, is there a way to disable this? the other option i can think of is to redefine the commands *ddedit, *attedit, *ddatte,*attipedit,

View 5 Replies View Related

AutoCAD Civil 3D :: Locked Layer Causes Contour Label

Jul 15, 2013

I'm working in 2011.  Just labeling some contours in a new drawing, using the 'Multiple' setting.  I found I could only draw one tangent of Contour Label Line.  If I continued, I could click but no labels were created and on finishing the command I could see that those clicks had been ignored.  What gives?

I found that the labels were on the current layer, instead of the layer they're meant to use.I also realised that my current layer was locked (from the previous task).

if the current layer is locked, the contour labels ignore the layer setting that they are meant to use, and come in on the current layer instead.  And you can only draw one tangent's worth of contour labels at a time before finishing the command and restarting.  

Solution: make a different layer current or unlock your layer.

are contour labels generally created on the current layer and then moved to their proper layer?Is that why it hit a snag: it wasn't permitted to move the object to a different layer because the one it was on was locked?

View 3 Replies View Related

AutoCAD VB :: How To Change View Using Combobox

Jun 9, 2013

I Want to change the View of viewport according to the Combobox change event.   the drawing is updating only after exiting the macro.  My aim is to view my 3D object in different views and to modify it. 

Here is my code.

Private Sub UserForm_Initialize()
ComboBox1.AddItem "Top"
ComboBox1.AddItem "Left"
ComboBox1.ListIndex = 0
End Sub

Private Sub ComboBox1_Change()
ThisDrawing.SendCommand "-View" & vbCr & ComboBox1.Text & vbCr
ThisDrawing.Regen acActiveViewport
End Sub

View 5 Replies View Related

Photoshop :: Layers Are Always Locked

May 15, 2008

I am using Photoshop CS2 and whenever I open a .jpg , .gif or use my scanner and scan something into PS the layer always starts out locked.

Is there a way to change this so it is not locked everytime?

View 2 Replies View Related

Photoshop :: Layers Are Locked

Mar 8, 2009

I am using Photoshop CS2 with Windows XP. Why are all the photos that I import into Photoshop have the layer locked. I tried to save them both as .psd and as .jpeg. But, it makes no difference. In the layer pallette, the layer is marked as locked but the icons at the top are all grayed out.

View 7 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved