Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Viewport problem

0 views
Skip to first unread message

Lim Siew Keng

unread,
Mar 30, 1998, 3:00:00 AM3/30/98
to

Thankx pple for reading
Anyway.. I faced this mega problem of my Autocad Application throwing up a
fatal access exception whenever I use the two cmds:

Set newVport=acadDoc.Viewports.Add("NEWVPORT")
acadDoc.ActiveViewport=newVport

They(cmds) used to work fine but after I opened the same dwg to run my VB
code for several times , my appln hangs up with the mentioned problem.
Is it becoz I should not use the same dwg or I should end my appln properly
after I run my VB code.

Thanks for any help

Kenneth Tam

unread,
Apr 1, 1998, 3:00:00 AM4/1/98
to

Lim:
I never try to set viewport through VB or VBA, but from what I reading in
your sample code, my thought is you missing the viewport def. You did add a
viewports into the viewports collection but only a name, you need to define
the viewport boundary. try 2 line of code after the ...Viewports.Add...:
newVport.Center = CenPoint 'You have to define a centerpoint
newVport.Width = dist 'a double value define the X distance this
Vport will cover
before you try to set it to be activate
Hope this may help, Good luck.

Lim Siew Keng wrote in message <01bd5bca$cae700e0$3bc415a5@lim>...

0 new messages