Batch Freeze/Thaw

Batch Freeze/Thaw

Anonymous
Not applicable
2,464 Views
8 Replies
Message 1 of 9

Batch Freeze/Thaw

Anonymous
Not applicable

Hi Guys,

 

A couple of years ago I cam across a LSP. created by Lee Mac that would thaw a layer across several drawings. I have since tweaked it to be able to freeze or thaw. I would like to add a selection dialog box showing the layer used in the drawing so that I can just select the layer rather then typing it out. my issue is , I'm good at breaking lSP not so good at creating one. I would be very great full if someone could help me out with this endeavor.

 

This is what I have so far.

 

 

0 Likes
2,465 Views
8 Replies
Replies (8)
Message 2 of 9

john.uhden
Mentor
Mentor

So, you're the one who hacked the DNC server?  Tell Putin that Trump will negotiate him blind.  Wait, NO, don't tell him.

 

Sounds to me like you need to create a list of the layers in all the docs (lst).

Then create a DCL with a multiple-select listbox to select the desired ones.

 

Sorry for the lack of detail, but you appear to be quite capable.

 

The only question is if you want to treat each layer by its given name or create the list including its drawing name.

For example "101ABC|LayerX" vs just "LayerX."  The former might create a quite lengthy list when all that is needed is the latter.

 

Then you have to decide if you want to filter the list to show only those frozen or thawed depending on the opposite action to be taken.

 

Ya know, if they are mostly Xrefs, then just turn on VISRETAIN and handle them once in the host drawing alone.

John F. Uhden

0 Likes
Message 3 of 9

Anonymous
Not applicable

I find your 'Batchfreeze' LISP very useful. Is there a way to make it freeze X-ref layers on DWG's? Or is that already built in and I'm missing it?

0 Likes
Message 4 of 9

kend
Explorer
Explorer

I have updated the lisp (with a little help) to include a dialog box that shows all layer, including Xref layers.

0 Likes
Message 5 of 9

Anonymous
Not applicable

Would anybody be willing to modify this so that it VP freezes/thaws layers in all viewports of each drawing?

 

We are transitioning to Sheet Set Manager and I've been surprised to find that nobody seems to want or need this functionality. I'm not sure how most people are managing their layers when using SSM, but we are still relying on VP Freeze in each layout sheet to decide what's visible. On the occasion that someone creates a new layer in an XREF file, or draws something on a layer that was previously empty, it shows up across all sheets and needs to be frozen. It's preferred to not handle this with global freezing, because many folks are in the habit of turning all layers on in Model Space to make sure nothing important is hiding.

 

This would be an amazing tool if someone is so inclined! Making this change myself is way beyond my ability.

 

Thanks!

0 Likes
Message 6 of 9

Anonymous
Not applicable

COULD THIS INCLUDE INDIVIDUAL LAYERS IN THE XREFS.

I HAVE A FROZEN LAYER IN MY TITLEBLOCK XREF THAT HAS BEEN FROZEN IN MULTIPLE DRAWINGS AND I NEED TO THAW JUST THAT ONE LAYER.

 

EVAN

0 Likes
Message 7 of 9

Sea-Haven
Mentor
Mentor

Try this

 

(defun c:test ( / laym lay )
(setvar 'ctab "MODEL" )
(setq laym (cdr (assoc 8 (entget (car (entsel "\npick object on layer to freeze "))))))
(vlax-for lay (vla-get-Layouts (vla-get-activedocument (vlax-get-acad-object)))
(if (= (vla-get-name lay) "Model")
(princ)
(progn
(setvar  'ctab (vla-get-name lay))
(command "._MSPACE")
(command "Vplayer" "F" laym "" "")
)
)
)
(princ)
)
(c:test)
0 Likes
Message 8 of 9

pbejse
Mentor
Mentor

@Anonymous wrote:

COULD THIS INCLUDE INDIVIDUAL LAYERS IN THE XREFS.


 

The attached lisp on post # 4 does exactly that. the listbox includes layers from any attached xref. or is it something else you're looking for?

 

0 Likes
Message 9 of 9

Anonymous
Not applicable
WORKS FINE THANKS FOR YOUR ASSISTANCE
0 Likes