AutoCAD Architecture Customization
Welcome to Autodesk’s AutoCAD Architecture Customization Forums. Share your knowledge, ask questions, and explore popular AutoCAD Architecture Customization topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Freezing Xref Layers in Viewports

8 REPLIES 8
Reply
Message 1 of 9
Anonymous
512 Views, 8 Replies

Freezing Xref Layers in Viewports

I would like to have certain layers from xrefs frozen in some viewports in
my templates. The xrefs are not attached to the templates, so I can't just
set it up by opening the vp and freezing the layers. I know how to use lisp
to freeze layers from xrefs with a wild card *|A-Wall-Abov for example. Can
do I do a similar thing in a viewport? The name of the layout tabs will
always be the same, and there is only one vp per tab. Thanks for any help.

Robert
8 REPLIES 8
Message 2 of 9
onimod
in reply to: Anonymous

Robert

Did you get a reply?

I'm interested if there is a way to do what you are asking.

Nicholas Childs
Message 3 of 9
Anonymous
in reply to: Anonymous

Robert,

Have your tried using the "_.vplayer" command while set to the active tab?
That should do the trick.

Cheers,

Peter Funk
API Product Manager
Building Industry Division
Autodesk, Inc.


"Robert Connor" wrote in message
news:303989DC480C5D1ED2E7DF476157465F@in.WebX.maYIadrTaRb...
> I would like to have certain layers from xrefs frozen in some viewports in
> my templates. The xrefs are not attached to the templates, so I can't
just
> set it up by opening the vp and freezing the layers. I know how to use
lisp
> to freeze layers from xrefs with a wild card *|A-Wall-Abov for example.
Can
> do I do a similar thing in a viewport? The name of the layout tabs will
> always be the same, and there is only one vp per tab. Thanks for any
help.
>
> Robert
>
>
Message 4 of 9
Anonymous
in reply to: Anonymous

There is no way to freeze a layer in a viewport if that layer does not exist
in the drawing 😞

However, I have created a set of tools for working with freezing layers in
viewports that you may be able to use after the xrefs are brought into you
drawing. Look in Customer Files for a post from me titled "Viewport Layers"
on 7/10/01. Good Luck.
--
Bobby C. Jones
p.s. - These tools are written in lisp, I'll most likely be reworking them
in VBA in the near future. If anyone else is interested, let me know and
I'll post what I come up with.
Message 5 of 9
Anonymous
in reply to: Anonymous

Peter,

That is great. I just have lisp change to a layout name that we have in
nearly all of our drawings, run the _.vplayer command, and switch back to
the model tab. The only problem is when the layout tab that I have chosen
is not in the drawing, then it cancels the function. Since the tab is in
all of the templates by default, someone has to delete it, and if they do,
oh well. This is great. I am really happy to know that I will never have
to see the dashed lines over a door on a plot again. I can now set up the
templates to plot only the correct layers. This is a great step for us.
Thank you very much for the help.

Robert Connor

For anyone who is interested this is the lisp I used. I know that there are
probably better ways to do this, but this is the only command I have ever
written that goes beyond key short cuts for zoom extents.

(command ".ctab" "11x17")
(command "_.vplayer" "F" "*|A-Wall-Abov" "A" "")
(command ".ctab" "Model")



"Peter Funk - Autodesk, Inc" wrote in message
news:4DB2C52CD73C0A08FEB435E202F07ABC@in.WebX.maYIadrTaRb...
> Robert,
>
> Have your tried using the "_.vplayer" command while set to the active tab?
> That should do the trick.
>
> Cheers,
>
> Peter Funk
> API Product Manager
> Building Industry Division
> Autodesk, Inc.
>
>
> "Robert Connor" wrote in message
> news:303989DC480C5D1ED2E7DF476157465F@in.WebX.maYIadrTaRb...
> > I would like to have certain layers from xrefs frozen in some viewports
in
> > my templates. The xrefs are not attached to the templates, so I can't
> just
> > set it up by opening the vp and freezing the layers. I know how to use
> lisp
> > to freeze layers from xrefs with a wild card *|A-Wall-Abov for example.
> Can
> > do I do a similar thing in a viewport? The name of the layout tabs will
> > always be the same, and there is only one vp per tab. Thanks for any
> help.
> >
> > Robert
> >
> >
>
>
Message 6 of 9
Anonymous
in reply to: Anonymous

This code will check for the existance of viewports on the 11x17 layout and
only run your code if they exist.

(if (ssget "_x" '((0 . "VIEWPORT") (410 . "11x17")))
(command ".ctab" "11x17")
(command "_.vplayer" "F" "*|A-Wall-Abov" "A" "")
(command ".ctab" "Model")
)

--
Bobby C. Jones
Message 7 of 9
Anonymous
in reply to: Anonymous

Bobby,

There is some problem with the code, or my use of it. When I place it in my
acad.lsp file, which loads with every drawing, I get this ; error: syntax
error Nothing happens and the drawing loads the rest of the way. I am not
using it correctly? When I use my three commands in the acad.lsp they run
just like I expect.

Thanks,

Robert


"Bobby Jones" wrote in message
news:171996AAB906630443CE5A81B61C57DD@in.WebX.maYIadrTaRb...
> This code will check for the existance of viewports on the 11x17 layout
and
> only run your code if they exist.
>
> (if (ssget "_x" '((0 . "VIEWPORT") (410 . "11x17")))
> (command ".ctab" "11x17")
> (command "_.vplayer" "F" "*|A-Wall-Abov" "A" "")
> (command ".ctab" "Model")
> )
>
> --
> Bobby C. Jones
>
>
>
Message 8 of 9
Anonymous
in reply to: Anonymous

Sorry Robert. Nothing wrong with you, it was all me 🙂 This code will
work for you.

(if (ssget "_x" '((0 . "VIEWPORT") (410 . "11x17")))
(progn
(command ".ctab" "11x17")
(command "_.vplayer" "F" "*|A-Wall-Abov" "A" "")
(command ".ctab" "Model")
)
)
--
Bobby C. Jones
Message 9 of 9
Anonymous
in reply to: Anonymous

Bobby,

Yeah that works. Thanks. This is really cool. Every step that I can save
the rest of the staff is just money we can save and drawings that look
better.

Thanks,

Robert

"Bobby Jones" wrote in message
news:CE57C23E8EB562B4516725A94E3EAF0D@in.WebX.maYIadrTaRb...
> Sorry Robert. Nothing wrong with you, it was all me 🙂 This code will
> work for you.
>
> (if (ssget "_x" '((0 . "VIEWPORT") (410 . "11x17")))
> (progn
> (command ".ctab" "11x17")
> (command "_.vplayer" "F" "*|A-Wall-Abov" "A" "")
> (command ".ctab" "Model")
> )
> )
> --
> Bobby C. Jones
>
>
>

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

”Boost