ClientView (again)

ClientView (again)

Anonymous
Not applicable
735 Views
8 Replies
Message 1 of 9

ClientView (again)

Anonymous
Not applicable
Anyone know how to control ClientView? Pretty easy to get a window with
a part or an assembly but I have yet to figure out how to pan / zoom or
orbit programitically.
0 Likes
736 Views
8 Replies
Replies (8)
Message 2 of 9

Anonymous
Not applicable
Talking to myself: I figured out how to get some of it working in VB
like changing the view programatically. Would still like to get some
better examples. This is a tool with great potential.

Charles Bliss wrote:

> Anyone know how to control ClientView? Pretty easy to get a window
> with a part or an assembly but I have yet to figure out how to pan /
> zoom or orbit programitically.
>
0 Likes
Message 2 of 9

Anonymous
Not applicable
Charles,

I've posted a sample to customer files. Look for the post "ClientView
Sample". The UI is a bit rough, but it demonstrates a good portion of the
functionality. The ClientView does not have a lot of smarts by itself.
Basically, it is a mechanism that allows Inventor to display a document
within someone elses window. You are still the owner of the window, so any
events within the window must be captured by you. For example if you want
to support dynamic rotation, you need to capture the mouse move events and
then modify the camera of the ClientView so that you continue to get
different views of the model. This results in a dynamic rotation. This
sample does this. The thing I didn't implement was the mouse wheel to zoom
in and out. Instead it uses the right mouse button. VB doesn't have direct
support for the mouse wheel. I did a quick search on the web and it's
relatively easy to find code that allows you to capture the wheel changes
but I didn't put this in the sample.

-Brian


"Charles Bliss" wrote in message
news:3DD705AC.7000008@cbliss.com...
> Anyone know how to control ClientView? Pretty easy to get a window with
> a part or an assembly but I have yet to figure out how to pan / zoom or
> orbit programitically.
>
0 Likes
Message 4 of 9

Anonymous
Not applicable
Thanks Brian, you're an invaluable resource of wisdom.


"Brian Ekins" wrote in message
news:1B3A73BCD10A7448E3F446BA6BBD1426@in.WebX.maYIadrTaRb...
> Charles,
>
> I've posted a sample to customer files. Look for the post "ClientView
> Sample". The UI is a bit rough, but it demonstrates a good portion of the
> functionality. The ClientView does not have a lot of smarts by itself.
> Basically, it is a mechanism that allows Inventor to display a document
> within someone elses window. You are still the owner of the window, so
any
> events within the window must be captured by you. For example if you want
> to support dynamic rotation, you need to capture the mouse move events and
> then modify the camera of the ClientView so that you continue to get
> different views of the model. This results in a dynamic rotation. This
> sample does this. The thing I didn't implement was the mouse wheel to
zoom
> in and out. Instead it uses the right mouse button. VB doesn't have
direct
> support for the mouse wheel. I did a quick search on the web and it's
> relatively easy to find code that allows you to capture the wheel changes
> but I didn't put this in the sample.
>
> -Brian
>
>
> "Charles Bliss" wrote in message
> news:3DD705AC.7000008@cbliss.com...
> > Anyone know how to control ClientView? Pretty easy to get a window with
> > a part or an assembly but I have yet to figure out how to pan / zoom or
> > orbit programitically.
> >
>
>
0 Likes
Message 4 of 9

Anonymous
Not applicable
Thanks Brian,
Last night I got the pan and zoom working but had not yet started in on
the orbit. Just for fun, I added in some markup capability. I know
where I can find wheel code. Pleasantly your sample is very much like
what I had "discovered" but of course yours is much cleaner.

The big struggle for me was I kept trying to use the ClientView.ocx. It
wasn't until I looked at the C++ sample that I realized I needed to use
Apprentice.

Thanks again, you are ever helpful.

Brian Ekins wrote:

>Charles,
>
>I've posted a sample to customer files. Look for the post "ClientView
>Sample". The UI is a bit rough, but it demonstrates a good portion of the
>functionality. The ClientView does not have a lot of smarts by itself.
>Basically, it is a mechanism that allows Inventor to display a document
>within someone elses window. You are still the owner of the window, so any
>events within the window must be captured by you. For example if you want
>to support dynamic rotation, you need to capture the mouse move events and
>then modify the camera of the ClientView so that you continue to get
>different views of the model. This results in a dynamic rotation. This
>sample does this. The thing I didn't implement was the mouse wheel to zoom
>in and out. Instead it uses the right mouse button. VB doesn't have direct
>support for the mouse wheel. I did a quick search on the web and it's
>relatively easy to find code that allows you to capture the wheel changes
>but I didn't put this in the sample.
>
>-Brian
>
>
>"Charles Bliss" wrote in message
>news:3DD705AC.7000008@cbliss.com...
>
>
>>Anyone know how to control ClientView? Pretty easy to get a window with
>>a part or an assembly but I have yet to figure out how to pan / zoom or
>>orbit programitically.
>>
>>
>>
>
>
>
>
0 Likes
Message 4 of 9

Anonymous
Not applicable
I have finally found time to look at this. It seems that often when I first
start up and browse and select a file some times nothing shows up. Some of
those times it will show up if I click in the picture window, but other
times it never will show up. Once it does that no matter what file I select
it won't show the picture. Also some files not only won't show up, but
give a Run-time error '-2147418113(8000ffff)': Method 'Update' of object'
_IRxClientView' failed. If I click debug it is on the ClientView.update
true line.

Apparently no one else had these problems with the example vb project...
anyone have any idea's what might be causing the problem for me?
Interestingly a file that refused to ever load in the example project is
able to load in Charles newest Inventor Preview program.

Also I am a little confused... is the normal method of working with the
Client view to use a picturebox? When I first started messing with it I
just added the ocx to the toolbox and drew a window with it. It seems to
basically work, except for it seems to display what ever was behind it when
the form loads.


--
Kent Keller
Member of the Autodesk Discussion Forum Moderator Program

http://www.MyMcad.com/KWiK/Mcad.htm

"Brian Ekins" wrote in message
news:1B3A73BCD10A7448E3F446BA6BBD1426@in.WebX.maYIadrTaRb...
> Charles,
>
> I've posted a sample to customer files. Look for the post "ClientView
> Sample". The UI is a bit rough, but it demonstrates a good portion of the
> functionality. The ClientView does not have a lot of smarts by itself.
> Basically, it is a mechanism that allows Inventor to display a document
> within someone elses window. You are still the owner of the window, so
any
> events within the window must be captured by you. For example if you want
> to support dynamic rotation, you need to capture the mouse move events and
> then modify the camera of the ClientView so that you continue to get
> different views of the model. This results in a dynamic rotation. This
> sample does this. The thing I didn't implement was the mouse wheel to
zoom
> in and out. Instead it uses the right mouse button. VB doesn't have
direct
> support for the mouse wheel. I did a quick search on the web and it's
> relatively easy to find code that allows you to capture the wheel changes
> but I didn't put this in the sample.
>
> -Brian
>
>
> "Charles Bliss" wrote in message
> news:3DD705AC.7000008@cbliss.com...
> > Anyone know how to control ClientView? Pretty easy to get a window with
> > a part or an assembly but I have yet to figure out how to pan / zoom or
> > orbit programitically.
> >
>
>
0 Likes
Message 4 of 9

Anonymous
Not applicable
I think i know what you mean.
0 Likes
Message 8 of 9

Anonymous
Not applicable
I put it on the back burner as well as I couldn't get it to reliably
show the inventor files. The C++ version which is included in sample
files seems to work but I don't have the energy to remember how to
program in C++. I was able to get the wheelhouse working with it and
most of the other things I wanted but if ClientView isn't going to show
me the files reliably it seems a bit pointless.

Kent Keller wrote:

>I have finally found time to look at this. It seems that often when I first
>start up and browse and select a file some times nothing shows up. Some of
>those times it will show up if I click in the picture window, but other
>times it never will show up. Once it does that no matter what file I select
>it won't show the picture. Also some files not only won't show up, but
>give a Run-time error '-2147418113(8000ffff)': Method 'Update' of object'
>_IRxClientView' failed. If I click debug it is on the ClientView.update
>true line.
>
>Apparently no one else had these problems with the example vb project...
>anyone have any idea's what might be causing the problem for me?
>Interestingly a file that refused to ever load in the example project is
>able to load in Charles newest Inventor Preview program.
>
>Also I am a little confused... is the normal method of working with the
>Client view to use a picturebox? When I first started messing with it I
>just added the ocx to the toolbox and drew a window with it. It seems to
>basically work, except for it seems to display what ever was behind it when
>the form loads.
>
>
>--
>Kent Keller
>Member of the Autodesk Discussion Forum Moderator Program
>
>http://www.MyMcad.com/KWiK/Mcad.htm
>
>"Brian Ekins" wrote in message
>news:1B3A73BCD10A7448E3F446BA6BBD1426@in.WebX.maYIadrTaRb...
>
>
>>Charles,
>>
>>I've posted a sample to customer files. Look for the post "ClientView
>>Sample". The UI is a bit rough, but it demonstrates a good portion of the
>>functionality. The ClientView does not have a lot of smarts by itself.
>>Basically, it is a mechanism that allows Inventor to display a document
>>within someone elses window. You are still the owner of the window, so
>>
>>
>any
>
>
>>events within the window must be captured by you. For example if you want
>>to support dynamic rotation, you need to capture the mouse move events and
>>then modify the camera of the ClientView so that you continue to get
>>different views of the model. This results in a dynamic rotation. This
>>sample does this. The thing I didn't implement was the mouse wheel to
>>
>>
>zoom
>
>
>>in and out. Instead it uses the right mouse button. VB doesn't have
>>
>>
>direct
>
>
>>support for the mouse wheel. I did a quick search on the web and it's
>>relatively easy to find code that allows you to capture the wheel changes
>>but I didn't put this in the sample.
>>
>>-Brian
>>
>>
>>"Charles Bliss" wrote in message
>>news:3DD705AC.7000008@cbliss.com...
>>
>>
>>>Anyone know how to control ClientView? Pretty easy to get a window with
>>>a part or an assembly but I have yet to figure out how to pan / zoom or
>>>orbit programitically.
>>>
>>>
>>>
>>
>>
>
>
>
>
0 Likes
Message 9 of 9

Anonymous
Not applicable
Volo View Express Control support for Inventor would be much simpler and easier to manage, and allow for sites that have AutoCAD/MDT/Inventor files.

Paul
0 Likes