Multi-viewport Support
The Viewport class is not derived from Windows.Forms.Control anymore and represents a drawing area inside the new SingleViewportLayout control class. The Eyeshot control class is now ViewportLayout.
These drawing areas are managed by ViewportLayout.Viewports collection. Many properties were moved at Viewport class level. For example to show a top view in one Viewport and a front view in the other you can use singleViewportLayout1.Viewports[0].SetView(viewType.Top) and singleViewportLayout1.Viewports[1].SetView(viewType.Front)
Legacy SingleViewportLayout.SetView() method was maintained and operates on the active Viewport. The index of the active viewport can be obtanied from ViewportLayout.ActiveViewport property.
Single, Three and FourViewportLayout are built-in viewport layouts but you are free to create your custom one as explained in the CustomViewportLayout source code sample.
Migration Guide
We recommend to take a full backup of your project(s) including your existing Eyeshot 4.x DLL. To migrate your Eyeshot 4.x based application to Eyeshot 5.0, follow the steps below:
- Replace the Eyeshot 4.x DLL with the Eyeshot 5.0 one in your project references
- Rename all Viewport as SingleViewportLayout in the designer file of your project
- Open the Form hosting the Eyeshot control
- Select the Eyeshot control
- Look for the Viewports collection property in the Properties window
- Add a viewport to the Viewports collection
- Save and close the designer
- Try to compile
Please note that:
- Materials collection is now a Dictionary<string matName, Material matDef> and the Entity.MaterialName is defined as string
- many properties (like Grid, DisplayMode, Camera, etc.) were moved at singleViewportLayout.Viewports[i] level
- legacy selection functions (like ClearSelection(), InvertSelection()) were moved at SingleViewportLayout.Entities level
- Labels collection is now at Viewport level allowing labels to be added only to one specific Viewport
- Labels.LeaderAndText class constructor now requires a Vector2D instead of a distance as last parameter
- Only the Language Reference of the product documentation is updated
- All the source code samples were ported to Eyeshot 5.0
- Viewport.Shadow.Opacity was renamed to ViewportLayout.PlanarShadowOpacity and Shadow.Distance to GroundPlaneDistance
- All the source code samples were ported to Eyeshot 5.0
Eyeshot 4.x Visual Studio Toolbox icons
It is possible that the Eyeshot 4.x Visual Studio Toolbox icons are not removed
during uninstallation. In this case, simply right-click the "Eyeshot Ultimate
4.1" Toolbox tab and select "Delete Tab".