Anuncios

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

Run layer state in active viewport, turning off paperspace objects

Anonymous

Run layer state in active viewport, turning off paperspace objects

Anonymous
No aplicable

Need some help. We have a drawing named "floor plan" xrefed and located in model space of our drawing "sheets" file. The "floor plan" drawing contains its own set of layer states - for floor plan, ceiling plan, etc. I have a sheet setup in the "sheets" file with a "titleblock" xrefed into paperspace and a viewport for the "floor plan" file. When I activate the viewport and run the layer state for the xrefed "floor plan" then the "titleblock" in paperspace turns off. Is there a way to run a layer state in a viewport and not affect paperspace objects?

 

Unfortunately, I cannot edit the "floor plan" layer states in the "sheets" file because the layer state editor will not allow you to edit layer states of an exerted drawing. Thanks.

0 Me gusta
Responder
662 Vistas
5 Respuestas
Respuestas (5)

imadHabash
Mentor
Mentor

Hi,

>> When I activate the viewport and run the layer state for the xrefed "floor plan" then the "titleblock" in paperspace turns off.

Since you can not edit the "floor plan" layer states , i suggest to change your titleblock layer . i mean change your titleblock layer that attached on . 

 

Imad Habash

EESignature

0 Me gusta

Anonymous
No aplicable

Thanks. That was one of our thoughts. When we worked in Autocad Windows there was an option to "Turn off layers not listed in later states" which resolved this issue, however I do not see this is an option in the Mac version. Ultimately to do as you suggest we would need to edit the layer states for each new project, which is doable, just not as convenient.

0 Me gusta

cadffm
Consultant
Consultant

If you asked for AutoCAD for MAC, you are in the wrong board..

 

 

And: You are right. I am not a MAC User, but what i can read from the MAC help, it isn't an option for AutoCAD for MAC.

 

-

But there should be a Lispfunction to do that (and as last option, it's possible to wrote one).

 

We can run a short test if you like, but i am not the one who wrote whole programs for others

Sebastian

0 Me gusta

cadffm
Consultant
Consultant

@cadffm wrote:

@Anonymous 

But there should be a Lispfunction to do that (and as last option, it's possible to wrote one).

We can run a short test if you like, but i am not the one who wrote whole programs for others


Copy this line to text EDITOR

(layerstate-restore "[XREFNAME]__[LAYERNAME]" (ssname (ssget "_X" (list'(0 . "VIEWPORT")(cons 69 (getvar 'CVPORT)))) 0) 4)

 

Open your main file

 

Edit: Change the red part to the XRef layer state name

For example, My XRefname is TEST and the layer state name is 123,

in your main file the XRef layer state name is: TEST__123

right?

OK:

(layerstate-restore "TEST__123" (ssname (ssget "_X" (list'(0 . "VIEWPORT")(cons 69 (getvar 'CVPORT))(cons 410 (getvar 'CTAB)))) 0) 4)

Copy to clipboard your edited line [CTRL]+[c]

Go into your viewport, paste your line [CTRL]+[V]

and?

 

 

Sebastian

brandon2WL3W
Community Visitor
Community Visitor

Same person...just different account...

 

Thanks for sending this, but I think we have found a work around where we will name all of our titleblocks (and associated titleblock layers) the same on every project and then just edit the layer states in our drawing template file. Appreciate the help.

0 Me gusta