Jump to content

Recommended Posts

Posted

Hi all,

 

This may be a shot in the dark...but here goes:

 

Can anyone come up with a macro to lock any given layer so that the layer becomes unselectable?

 

This can be done VIA the defpoints layer and freezing layer 0 - however when you regen the ACAD file the defpoints layer disappears...

 

The idea behind this is to create a background layer over part of an XREF - so you can work ontop of this.

 

I suppose another way around this would be to clip a hole in the XREF - however I am not sure how to do this...

Posted
i want to draw helical gear in autocad 2010. any one tell me how to draw helical gear tooth frofile in autocad.
wasim khan, perhaps you could use an array. Draw the helix, then draw one tooth at start position. Use ARRAY command, PATH option and select the helix that you need the teeth to run along. You'll probably get more help if you start a new thread with your questions.

 

Can anyone come up with a macro to lock any given layer so that the layer becomes unselectable?
MKKCAD do you want to lock the same layer every time with your macro, or do you want to lock a layer that you manually select?

 

If I understand correctly, the first option would be a macro like this:

^C^C-LAYER;LOCK;"LAYER NAME";;

Or the second would be like this (it is a standard button command in AutoCAD called "Layer, Layer Lock"):

^C^C_laylck

it also has a buddy to unlock:

^C^C_layulk

or you can simply unlock all:

^C^C-LAYER;UNLOCK;*;

Posted

Hi YZ,

 

I would like to manually select a layer...however I would like to see if it is possible to lock this layer so that it cannot be selected at all.

 

I notice that when you lock a layer in AutoCAD using the 'laylck' - this layer can still be selected despite being 'locked'. This is very annoying especially when the layer I want to lock is a solid block hatch. So if I want to select an object on top of this 'locked' hatch I have to select the line by pointing to it rather than drawing a box over it - otherwise it will just select the locked hatch instead.

 

Ideally I would like the solid hatch to be on a locked layer in the background - so I cannot select it at all.

 

I hope this makes sense and if you have any ideas that would be greatly appreciated.

 

Many thanks,

Posted

I think I do understand what you are saying. I have similar problems with hatches that "flash" when the mouse hovers over them with the selection preview highlighting. Again, we looked for options to exclude hatches from this feature.

 

As for solutions, I do not know of any. You could switch that layer off temporarily. Otherwise, is it such a bad thing if the solid gets selected when it is locked? You can still run commands on other objects and it will be dropped from selection at that time. I do this regularly in macros and then hit "PSELECT" button; Previous; and it gets me back to the objects I want, without the locked objects that I do not want. It is a clumsy workaround due to the limitations of LT, but perhaps you could incorporate something like this?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...