Author Topic: Invisible viewport  (Read 13738 times)

0 Members and 1 Guest are viewing this topic.

bbarron281

  • Guest
Re: Invisible viewport
« Reply #15 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.

ronjonp

  • Needs a day job
  • Posts: 7529
Re: Invisible viewport
« Reply #16 on: January 09, 2015, 11:40:21 AM »
Can you post your drawing ? Also .. try the code I posted in my previous response.

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: Invisible viewport
« Reply #17 on: January 09, 2015, 11:42:03 AM »
eagerly                   awaiting             a              sample             of                  this                    suspect                   file
Be your Best


Michael Farrell
http://primeservicesglobal.com/

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Invisible viewport
« Reply #18 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
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

bbarron281

  • Guest
Re: Invisible viewport
« Reply #19 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.

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: Invisible viewport
« Reply #20 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?
Be your Best


Michael Farrell
http://primeservicesglobal.com/

bbarron281

  • Guest
Re: Invisible viewport
« Reply #21 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.

ronjonp

  • Needs a day job
  • Posts: 7529
Re: Invisible viewport
« Reply #22 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.

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: Invisible viewport
« Reply #23 on: January 09, 2015, 12:11:29 PM »
time to delete that particular viewport and move on
Be your Best


Michael Farrell
http://primeservicesglobal.com/

bbarron281

  • Guest
Re: Invisible viewport
« Reply #24 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.

Bethrine

  • Guest
Re: Invisible viewport
« Reply #25 on: January 09, 2015, 12:54:14 PM »
Even when I'm clicked into the viewport, zoom moves paperspace.

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: Invisible viewport
« Reply #26 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
Be your Best


Michael Farrell
http://primeservicesglobal.com/

Bethrine

  • Guest
Re: Invisible viewport
« Reply #27 on: January 09, 2015, 01:01:08 PM »
Bethrine; your issue is the viewport is LOCKED a good thing.

Ah.  :embarrassed:  :2funny:

bbarron281

  • Guest
Re: Invisible viewport
« Reply #28 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.

Matt__W

  • Seagull
  • Posts: 12955
  • I like my water diluted.
Re: Invisible viewport
« Reply #29 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.
Autodesk Expert Elite
Revit Subject Matter Expert (SME)
Owner/FAA sUAS Pilot @ http://skyviz.io