Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Does the CWIMAQViewer.ZoomToFit property exist? Using C#.

Solved!
Go to solution

CWIMAQViewer.ZoomToFit property is listed in the NI Vision (8.6) documentation but it does not seem to exists. I am using C#. Is this a bug?

John A. Lively
NDE Engineer
Pratt & Whitney
0 Kudos
Message 1 of 6
(4,172 Views)
Solution
Accepted by Pratt

Here is the property you are looking for:

 

CWIMAQViewer1.GetCWIMAQViewer.ZoomToFit = True

 

One of the smartest colleagues here found it Jim9772

 

I hope helps you and everyone who is searching for it.

 

Please accept my regards.

Waleed El-Badry MSc.,MCPD, ISTQB Certified Tester
Assistant Lecturer
Mechatronics Department
Faculty of Engineering
Misr University for Science & Technology



View Waleed El-Badry's profile on LinkedIn

Message 2 of 6
(4,160 Views)

The actual C# syntax is:

 

CWIMAQViewer1.GetCWIMAQViewer().ZoomToFit = true;

 

I saw this method, but did not investigate. This means the Ni Vision documentation is wrong. Thanks for the help.

John A. Lively
NDE Engineer
Pratt & Whitney
0 Kudos
Message 3 of 6
(4,152 Views)

Hi Pratt,

 

Would you mind telling me specifically which documentation you are speaking of and where you found it?  I will have it corrected for you to avoid confusion in the future for others like you.  Thanks!

 

Kristen H.

0 Kudos
Message 4 of 6
(4,145 Views)

The only help I have found for C# is the VB help "cwimaq.chm". This is where I found the property. In the future it would help if C# documentation (syntax) is provided also. If you need more information let me know.

 

ZoomToFit Property

Syntax

CWIMAQViewer.ZoomToFit

Data Type

Boolean

Purpose

Boolean value that specifies if the display should automatically resize the image to fit in the viewer.

See Also

ZoomScale

John A. Lively
NDE Engineer
Pratt & Whitney
0 Kudos
Message 5 of 6
(4,143 Views)

Kristen,

The documentation didn't mention the calling path as implemented. I hope in VDM 2009, the new hirearchy of native .NET classes is illustrated as expected.

 

Cheers

Waleed El-Badry MSc.,MCPD, ISTQB Certified Tester
Assistant Lecturer
Mechatronics Department
Faculty of Engineering
Misr University for Science & Technology



View Waleed El-Badry's profile on LinkedIn

0 Kudos
Message 6 of 6
(4,140 Views)