TheSwamp

CAD Forums => CAD General => Topic started by: bbarron281 on January 09, 2015, 09:27:19 AM

Title: Invisible viewport
Post by: bbarron281 on January 09, 2015, 09:27:19 AM
I think this is my first time posting here. My problem involves a viewport that I cannot see the boundaries to. All layers are thawed and on, frame value is set to 3 (I don't know how because it says from 0-2). I can select the viewport by using the qselect command but even when I have it selected I cannot see the selection. I can, however, edit the attributes of said viewport in properties. I can easily just add another viewport to avoid this problem, I suppose, but I was wondering if anyone knew why I couldn't see it. Any help is appreciated. Thanks in advance.
Title: Re: Invisible viewport
Post by: mjfarrell on January 09, 2015, 09:32:30 AM
be sure all layers are ON and THAWED
perform a regen

and perhaps place your VIEWPORTS on a unique VIEWPORTS layer to control them better
Title: Re: Invisible viewport
Post by: Rob... on January 09, 2015, 09:35:00 AM
My guess is that it is the same color as your background.

If you could post a file exhibiting the behaviour, we could bypass the guessing.
Title: Re: Invisible viewport
Post by: mjfarrell on January 09, 2015, 09:39:32 AM
My guess is that it is the same color as your background.

If you could post a file exhibiting the behaviour, we could bypass the guessing.
the guessing is the fun part of this    :thinking:
Title: Re: Invisible viewport
Post by: CAB on January 09, 2015, 09:43:31 AM
My guess  8)

VP is so large it is outside your current view.
Zoom Extents perhaps?
Title: Re: Invisible viewport
Post by: craigr on January 09, 2015, 09:51:56 AM
What bit me one time is that I had the Light on, Thaw on, but the 'freeze and thaw in current viewport' option in my 'Layers' Toolbar.

craigr
Title: Re: Invisible viewport
Post by: ronjonp on January 09, 2015, 10:54:06 AM
You mean like this ?
Title: Re: Invisible viewport
Post by: Rob... on January 09, 2015, 11:01:47 AM
Okay, I'll bite. How did you do that?
Title: Re: Invisible viewport
Post by: craigr on January 09, 2015, 11:03:47 AM
I'm Stumped so far.

I am going to ignore the rest of the responses in this topic until Monday to see if I can figure it out over the w/e.

:)
Title: Re: Invisible viewport
Post by: ronjonp on January 09, 2015, 11:07:31 AM
vla-put-visible (http://help.autodesk.com/view/CIV3D/2015/ENU/?guid=GUID-8161BA70-820D-47EA-8D14-1E8B8AEF3315)  :)
Title: Re: Invisible viewport
Post by: Rob... on January 09, 2015, 11:16:21 AM
That explanation is above my head. Is there a layman's way to do/undo it?
Title: Re: Invisible viewport
Post by: mjfarrell on January 09, 2015, 11:18:46 AM
vla-put-invisible (http://help.autodesk.com/view/CIV3D/2015/ENU/?guid=GUID-B5C539EB-F345-4517-9463-8E77A59F635B)  :)

I would think that would 'only' work for block attributes?    hmmmmm
Title: Re: Invisible viewport
Post by: Rob... on January 09, 2015, 11:20:58 AM
vla-put-invisible (http://help.autodesk.com/view/CIV3D/2015/ENU/?guid=GUID-B5C539EB-F345-4517-9463-8E77A59F635B)  :)

I would think that would 'only' work for block attributes?    hmmmmm

That's what I got out of it, too, but "apparently" not the case.
Title: Re: Invisible viewport
Post by: bbarron281 on January 09, 2015, 11:23:37 AM
You mean like this ?

Like this, yes.
Title: Re: Invisible viewport
Post by: ronjonp on January 09, 2015, 11:32:35 AM
Wrong link LOL .. updated above. vla-put-visible NOT vla-put-invisible. :)


See if this fixes it:
Code - Auto/Visual Lisp: [Select]
  1. (defun c:foo ( / i )
  2.   (repeat (setq i (sslength (ssget "_x" '((0 . "viewport")))))
  3.     (vlax-put (vlax-ename->vla-object (ssname ss (setq i (1- i)))) 'visible -1)
  4.   )
  5.   (princ)
  6. )
Title: Re: Invisible viewport
Post by: bbarron281 on January 09, 2015, 11:38:06 AM
I wasn't the original author of this CAD file. I was wrong about creating a new viewport to avoid this problem. The new one that I just created is invisible too. It's on its own "viewport" layer which is on and thawed. The color of the layer is different from the background color which is black. I created the viewport by drawing a polygon so I know it's not bigger than what's viewable on screen. Still stumped. I feel like you might know the solution, ronjonp.
Title: Re: Invisible viewport
Post by: ronjonp on January 09, 2015, 11:40:21 AM
Can you post your drawing ? Also .. try the code I posted in my previous response.
Title: Re: Invisible viewport
Post by: mjfarrell on January 09, 2015, 11:42:03 AM
eagerly                   awaiting             a              sample             of                  this                    suspect                   file
Title: Re: Invisible viewport
Post by: CAB on January 09, 2015, 11:43:25 AM
Ron, in 2006
Code: [Select]
Command: (defun c:foo ( / i )
(_>      (repeat (setq i (sslength (ssget "_x" '((0 . "viewport")))))
((_>        (vlax-put (vlax-ename->vla-object (ssname ss (setq i (1- i))))
'visible -1)
((_>      )
(_>      (princ)
(_>     )
C:FOO

Command: foo
; error: bad argument type: lselsetp nil
Title: Re: Invisible viewport
Post by: bbarron281 on January 09, 2015, 11:43:38 AM
I don't feel comfortable posting the drawing...work related stuff, you know. Let me know if I ran the code right. I copied it to notepad, saved it as .lsp, appload in autocad, executed "foo" command.

I have limited experience in lisp routines so I think it's likely I missed or messed up a step. But after the command nothing changed, not in respect to the invisibility of the viewport anyway.
Title: Re: Invisible viewport
Post by: mjfarrell on January 09, 2015, 11:46:01 AM
save the file with a NEW NAME

ERASE everything other than the SICK Viewport.....easy enough to remove ALL TRACE of who, or what the file is about.

Or don't you want this resolved?
Title: Re: Invisible viewport
Post by: bbarron281 on January 09, 2015, 11:47:29 AM
Here's a stripped down version. There are two viewports. One can be seen in the bottom and the one above it is invisible.
Title: Re: Invisible viewport
Post by: ronjonp on January 09, 2015, 11:57:03 AM
Ron, in 2006
Code: [Select]
Command: (defun c:foo ( / i )
(_>      (repeat (setq i (sslength (ssget "_x" '((0 . "viewport")))))
((_>        (vlax-put (vlax-ename->vla-object (ssname ss (setq i (1- i))))
'visible -1)
((_>      )
(_>      (princ)
(_>     )
C:FOO

Command: foo
; error: bad argument type: lselsetp nil
That's what happens when I don't test it :oops:

Code - Auto/Visual Lisp: [Select]
  1. (defun c:foo (/ i ss)
  2.   (setq ss (ssget "_x" '((0 . "viewport"))))
  3.   (repeat (setq i (sslength ss))
  4.     (vlax-put (vlax-ename->vla-object (ssname ss (setq i (1- i)))) 'visible -1)
  5.   )
  6.   (princ)
  7. )
Although it does not fix the OP drawing.
Title: Re: Invisible viewport
Post by: mjfarrell on January 09, 2015, 12:11:29 PM
time to delete that particular viewport and move on
Title: Re: Invisible viewport
Post by: bbarron281 on January 09, 2015, 12:32:37 PM
Already have. This error has reoccurred with the new viewport that I created as well. The explanation I will get from my supervisor is that it's an error in the drawing. This seems like a bit of a cop-out explanation to me but that's probably because I'm stubborn and want a reason for everything. I'll figure out a way around it though. Thanks for the help, everyone.
Title: Re: Invisible viewport
Post by: Bethrine on January 09, 2015, 12:54:14 PM
Even when I'm clicked into the viewport, zoom moves paperspace.
Title: Re: Invisible viewport
Post by: mjfarrell on January 09, 2015, 12:58:19 PM
Bethrine; your issue is the viewport is LOCKED a good thing.


bbarron281

This worked here

I wblocked/deleted the viewport into a new dwg
it opens and knows it is still a viewport yet it displays
then copied with basepoint
and pasted back to original coordinates in your sample file
it displays and is a viewport once again

now trying to solve WHAT happened to it....to start the issue off
Title: Re: Invisible viewport
Post by: Bethrine on January 09, 2015, 01:01:08 PM
Bethrine; your issue is the viewport is LOCKED a good thing.

Ah.  :embarrassed:  :2funny:
Title: Re: Invisible viewport
Post by: bbarron281 on January 09, 2015, 01:21:24 PM
mjfarrell, I've taken the file I provided and qselected the viewport then did the wblock command with a base point. Then in the drawing I'm working with I've run the insert command to the exact base point but I'm not getting anything. I've missed a step here. I rarely use the wblock command so I bet I messed it up.
Title: Re: Invisible viewport
Post by: Matt__W on January 09, 2015, 01:48:04 PM
Looks like someone drew a rectangle, used the VPCLIP command to modify an existing viewport to then use the newly created rectangle, then the rectangle was deleted leaving behind the viewport. I don't know of any way to recreate the viewport outline without some sort of programming wizardry.
Title: Re: Invisible viewport
Post by: bbarron281 on January 09, 2015, 01:56:51 PM
You're right about the rectangle for the viewport outline then deletion. Not sure about the first parts though.
Title: Re: Invisible viewport
Post by: mjfarrell on January 09, 2015, 02:18:31 PM
mjfarrell, I've taken the file I provided and qselected the viewport then did the wblock command with a base point. Then in the drawing I'm working with I've run the insert command to the exact base point but I'm not getting anything. I've missed a step here. I rarely use the wblock command so I bet I messed it up.

Just WBLOCK to NEW file

don't worry over insertion point or anything

Open that NEW file that you just made....copy with basepoint

Then paste to original coordinates back in the file you just wblocked it out of
Title: Re: Invisible viewport
Post by: bbarron281 on January 09, 2015, 02:31:22 PM
I'm obviously doing something wrong. The only way I can select the viewport is through qselect. After it says I have it selected (I can't tell just by looking because there's nothing showing up as being selected) I execute wblock. Source is set as "Objects" base point is "0,0,0" objects is "Retain" and I specify the file name. Click OK. I include AutoCAD Map information (not sure if this is or isn't necessary). I open the file. Nothing's there. I run qselect to attempt to get the viewport and it grabs nothing.
Title: Re: Invisible viewport
Post by: Matt__W on January 09, 2015, 02:31:53 PM
Doesn't work with AutoCAD MEP 2015. Qselect shows viewport as an option but when I choose to select all...... nothing.  :|
Title: Re: Invisible viewport
Post by: bbarron281 on January 09, 2015, 02:33:23 PM
I'm in Civil 3D 2013, btw.
Title: Re: Invisible viewport
Post by: mjfarrell on January 09, 2015, 02:38:56 PM
I'm in Civil 3D 2013, btw.
C3D2014 here
Title: Re: Invisible viewport
Post by: bbarron281 on January 09, 2015, 02:53:37 PM
I give up. I found a solution anyway following the K.I.S.S. philosophy. Just executed mv and corner to corner. Voila, it's there. I seem to remember being able to delete the polygon afterwards and the viewport was its own entity with an outline and grips to modify. I would have to change the frame value to 2 or 3 to get the outline but once it was there I could easily toggle/select it. Am I wrong on that?
Title: Re: Invisible viewport
Post by: mjfarrell on January 09, 2015, 02:56:00 PM
I give up. I found a solution anyway following the K.I.S.S. philosophy. Just executed mv and corner to corner. Voila, it's there. I seem to remember being able to delete the polygon afterwards and the viewport was its own entity with an outline and grips to modify. I would have to change the frame value to 2 or 3 to get the outline but once it was there I could easily toggle/select it. Am I wrong on that?

I don't mess with viewport frames...I put them on a NON PLOTTING layer and leave them alone
Title: Re: Invisible viewport
Post by: bbarron281 on January 09, 2015, 03:08:45 PM
Yeah me too.
Title: Re: Invisible viewport
Post by: Bethrine on January 09, 2015, 03:46:19 PM
Me three. I actually put them on defpoints and turn that layer yellow so they move if I move something but they aren't distracting.
Title: Re: Invisible viewport
Post by: mjfarrell on January 09, 2015, 03:56:10 PM
Me three. I actually put them on defpoints and turn that layer yellow so they move if I move something but they aren't distracting.
you should NOT be using layer defpoints - that layer is NOT for humans to use
Title: Re: Invisible viewport
Post by: Bethrine on January 09, 2015, 03:59:06 PM
Me three. I actually put them on defpoints and turn that layer yellow so they move if I move something but they aren't distracting.
you should NOT be using layer defpoints - that layer is NOT for humans to use

 :blink: :brow: Why?
Title: Re: Invisible viewport
Post by: Rob... on January 09, 2015, 04:00:07 PM
you should NOT be using layer defpoints - that layer is NOT for humans to use

That's the 2nd time I've agreed with posts of yours in the same thread. I think it's a new record.
Title: Re: Invisible viewport
Post by: mjfarrell on January 09, 2015, 04:03:51 PM
Me three. I actually put them on defpoints and turn that layer yellow so they move if I move something but they aren't distracting.
you should NOT be using layer defpoints - that layer is NOT for humans to use

 :blink: :brow: Why?

DEFPOINTS layer is ONLY for autocad to keep track of Dimension Origins

Objects on it will revert to plotable objects after you run AUDIT command anyway

They get 'locked' if layer zero (0) is turned off or locked...or similar symptoms

So, just quit it, OK?
Title: Re: Invisible viewport
Post by: Bethrine on January 09, 2015, 04:16:18 PM
DEFPOINTS layer is ONLY for autocad to keep track of Dimension Origins

Objects on it will revert to plotable objects after you run AUDIT command anyway

They get 'locked' if layer zero (0) is turned off or locked...or similar symptoms

So, just quit it, OK?

I was aware of why Defpoints is there.

I have run AUDIT and not had that problem...ever.

Locked as in need to hit unlock to manage them again? Or as in no longer changable at all?

I'm thinking about it!  :straight: I tend to have issues with viewports on a VP layer and not when they are on defpoints...?? No specific example of this though.  :|
Title: Re: Invisible viewport
Post by: mjfarrell on January 09, 2015, 04:18:19 PM
DEFPOINTS layer is ONLY for autocad to keep track of Dimension Origins

Objects on it will revert to plotable objects after you run AUDIT command anyway

They get 'locked' if layer zero (0) is turned off or locked...or similar symptoms

So, just quit it, OK?

I was aware of why Defpoints is there.

I have run AUDIT and not had that problem...ever.

Locked as in need to hit unlock to manage them again? Or as in no longer changable at all?

I'm thinking about it!  :straight: I tend to have issues with viewports on a VP layer and not when they are on defpoints...?? No specific example of this though.  :|



#LORAX VOICE#

You have been WARNED!

#LORAX VOICE#
Title: Re: Invisible viewport
Post by: Bethrine on January 09, 2015, 04:27:12 PM
#LORAX VOICE#

You have been WARNED!

#LORAX VOICE#

 :wideeyed: Now I'm jinxed. Thanks. Okay, I'll stop. Ugh. This will be interesting.
Title: Re: Invisible viewport
Post by: mjfarrell on January 09, 2015, 04:30:42 PM
(http://www.troll.me/images/obama-point/you-have-been-warned.jpg)
Title: Re: Invisible viewport
Post by: Cathy on January 09, 2015, 05:15:29 PM
The viewport is CLIPPED.  I think if you just do a MVIEW Restore, it will UNCLIP it and you can see it again. 
Title: Re: Invisible viewport
Post by: CAB on January 09, 2015, 06:02:17 PM
Some people take their DEFPOINTS layer way too seriously. :)
Title: Re: Invisible viewport
Post by: Rob... on January 09, 2015, 06:07:59 PM
Some people take their DEFPOINTS layer way too seriously. :)

It's not theirs, its AutoCAD's.
Title: Re: Invisible viewport
Post by: CAB on January 09, 2015, 06:23:43 PM
When it is in MY drawing it's my layer & I'll do with it what I want.  :P
Title: Re: Invisible viewport
Post by: Scott on January 09, 2015, 11:22:35 PM
(http://www.troll.me/images/obama-point/you-have-been-warned.jpg)

OH I'm scared!!!!!!
Title: Re: Invisible viewport
Post by: tedg on January 12, 2015, 09:21:59 AM
DEFPOINTS layer is ONLY for autocad to keep track of Dimension Origins

Objects on it will revert to plotable objects after you run AUDIT command anyway

They get 'locked' if layer zero (0) is turned off or locked...or similar symptoms

So, just quit it, OK?

I was aware of why Defpoints is there.

I have run AUDIT and not had that problem...ever.

Locked as in need to hit unlock to manage them again? Or as in no longer changable at all?

I'm thinking about it!  :straight: I tend to have issues with viewports on a VP layer and not when they are on defpoints...?? No specific example of this though.  :|


This is a very hot topic in AUGI as well, lots of good reasons not to use defpoints, mostly because since 2000, we've been given the ability to create non-plotting layers, so why risk it.


Just a few discussions on the issue:

http://forums.augi.com/showthread.php?155846-Defpoints-and-Layer-0&p=1266702&viewfull=1#post1266702
http://forums.augi.com/showthread.php?155846-Defpoints-and-Layer-0
http://forums.augi.com/showthread.php?120475-Can-not-select-viewportsr

Title: Re: Invisible viewport
Post by: Bethrine on January 12, 2015, 09:42:04 AM
This is a very hot topic in AUGI as well, lots of good reasons not to use defpoints, mostly because since 2000, we've been given the ability to create non-plotting layers, so why risk it.


Just a few discussions on the issue:

http://forums.augi.com/showthread.php?155846-Defpoints-and-Layer-0&p=1266702&viewfull=1#post1266702
http://forums.augi.com/showthread.php?155846-Defpoints-and-Layer-0
http://forums.augi.com/showthread.php?120475-Can-not-select-viewportsr

THAT was very informative and helpful! I will certianly be creating a no plot layer for things I don't want to plot from now on! From reading those, I bet this solves a couple of problems I've had on and off.  :idea:

Should I move the one's I've alredy put on defpoints off of there?  :sick:
Title: Re: Invisible viewport
Post by: cadtag on January 12, 2015, 09:51:02 AM
...
Should I move the one's I've alredy put on defpoints off of there?  :sick:

If you think there's any chance at all those dwg files will every be opened again in the next 30 years, then yes. 
Title: Re: Invisible viewport
Post by: tedg on January 12, 2015, 09:55:03 AM
...
Should I move the one's I've alredy put on defpoints off of there?  :sick:

If you think there's any chance at all those dwg files will every be opened again in the next 30 years, then yes.
I bet some clever lisper could write some code that automatically places viewports on a pre-defined no plot layer upon opening your drawings... maybe within an acaddoc.lsp.


Just a thought.


But yes, I would move your viewport(s) to a layer that isn't defpoints (if I were you).
Title: Re: Invisible viewport
Post by: CAB on January 12, 2015, 09:56:13 AM
That's good info. I never use it myself but do receive drawing with view ports on that layer.
I guess I'll start cleaning them up before sending back to the originator.
Title: Re: Invisible viewport
Post by: Bethrine on January 12, 2015, 10:21:11 AM
Two thoughts:

1) I bet Zero and Defpoints being connected have something to do with block creation.

2) I wonder if this has been part of the cause of problems I've had moving stuff between AutoCAD and Inventor? (Something I get better at every time I need to do it.)
Title: Re: Invisible viewport
Post by: mjfarrell on January 12, 2015, 10:24:49 AM
Two thoughts:

1) I bet Zero and Defpoints being connected have something to do with block creation.



NOT Exactly 
Title: Re: Invisible viewport
Post by: Matt__W on January 12, 2015, 10:27:39 AM
http://autocad.wikia.com/wiki/Defpoints_Layer
Title: Re: Invisible viewport
Post by: Rob... on January 12, 2015, 10:28:16 AM
Should I move the one's I've alredy put on defpoints off of there?  :sick:

I wouldn't go back and "fix" every file, but I would change the layer in all active files.
Title: Re: Invisible viewport
Post by: tedg on January 12, 2015, 10:38:50 AM
Should I move the one's I've alredy put on defpoints off of there?  :sick:

I wouldn't go back and "fix" every file, but I would change the layer in all active files.
Good point, that's sort of what I was thinking, if you needed to go back into those drawings, you could change it then.
And some built-in code (acaddoc.lsp) would make it happen automagically.
Title: Re: Invisible viewport
Post by: Bethrine on January 12, 2015, 10:52:21 AM
Should I move the one's I've alredy put on defpoints off of there?  :sick:

I wouldn't go back and "fix" every file, but I would change the layer in all active files.

I already fixed the one's I am working on (active files). I will fix the ones I open as I go too. Thank you all!! ^-^

http://autocad.wikia.com/wiki/Defpoints_Layer

Awesome! So I can rename Defpoints to Viewport and it will automagically (I like that term) seperate all defpoints to a new Defpoints layer?
Title: Re: Invisible viewport
Post by: mjfarrell on January 12, 2015, 11:31:50 AM
Should I move the one's I've alredy put on defpoints off of there?  :sick:

I wouldn't go back and "fix" every file, but I would change the layer in all active files.

I already fixed the one's I am working on (active files). I will fix the ones I open as I go too. Thank you all!! ^-^

http://autocad.wikia.com/wiki/Defpoints_Layer

Awesome! So I can rename Defpoints to Viewport and it will automagically (I like that term) seperate all defpoints to a new Defpoints layer?
NOT  unless you are using IntelliiCAD
Title: Re: Invisible viewport
Post by: tedg on January 12, 2015, 12:31:40 PM
[SNIP]
Awesome! So I can rename Defpoints to Viewport and it will automagically (I like that term) seperate all defpoints to a new Defpoints layer?
I can't take credit for that, I stole the word from "Black Box" and I've seen others use it too.



Title: Re: Invisible viewport
Post by: Bethrine on January 12, 2015, 12:33:15 PM
Should I move the one's I've alredy put on defpoints off of there?  :sick:

I wouldn't go back and "fix" every file, but I would change the layer in all active files.

I already fixed the one's I am working on (active files). I will fix the ones I open as I go too. Thank you all!! ^-^

http://autocad.wikia.com/wiki/Defpoints_Layer

Awesome! So I can rename Defpoints to Viewport and it will automagically (I like that term) seperate all defpoints to a new Defpoints layer?
NOT  unless you are using IntelliiCAD

 :cry: