Home Page > KernelCAD Components > Model Explorer
Model Explorer Of KernelCAD Component
Model Explorer of KernelCAD Components
Model Explorer of KernelCAD components is a useful tool which shows structure of
the model, allows quickly find objects, manipulate view and perform some model
editing operations like movement of obejcts, Boolean Subtract and other
To open model explorer select Advanced > Model Explorer in the context mneu
(right click)
It is very similar to Model explorer of 3D Debugger. See
Model Explorer topic for general description
The explorer handles multiple selection in the object tree. It follows the
normal Windows multiple selection rules: Hold control to click several objects.
Hold shift and click first and last to select a range of objects.
Additional "Position and Oientation" button displays and allows modification of
location and orientation of an object or a set of them. The window shows/modifies
the local frame of the object.
Model Explorer can be launched programmatically using
IGlobalAPI_KC.LaunchExplorer()
When requested the component raises
KernelCAD event to
notify application about changes in item selection in explorer. Turn
ExplorerSelectionNotify property of
component context on to receive the
notification.
In the case eventType parameter in the KernelCADEvent(
long eventType, ...) callback method is
eEventExplorerSelection (value 5)
member of EDIEvent Enumeration.
The actual type of the second parameter
param0 in KernelCADEvent(
...) is IList. This
is the list of scene items currenty selected in the
Model Explorer. Elements of the list have type
IItem. As
usual, if the actual scene item is a section (a geometric object) query for
ISection from the
IItem yields a valid interface from which all other section-related
interfaces can be queried.
KernelCAD Developer product includes C# source code for the Model Explorer. By
default it is installed into
C:/Projects/<version>/KernelCAD_<version>/KC/Apps/Edit/EditorsNet folder. Open
C:\Projects\<version>\KernelCAD_<version>\KC\Apps\Edit\EditorsNet\Explorer\Explorer.sln
(Visual Studio 2013) to view or
modify the code. The folder also includes solutions for Visual Studio 2010 and 2008
If it is needed to copy the project, make sure that the target dll from the
project is created in the Bin folder of the KernelCAD installation directory, where KernelCAD will be looking for it.
See WixDeploy Tutorial about an example of customisation and debugging Model Explorer
Advanced: The Model Explorer dll is loaded on demand at runtime as a plugin. The installed (redistributed) version of it are named independently of bitness as: KCEdNnt32.dll (.NET) and KCEditN32.dll (Native). To avoid interference with redistributed version customised (rebuilt) version of Model Explorer dll is expected to have name: ModelExplExt.dll (.NET) and ModelExplExtNative.dll (Native).The customised names are already set in the installed Edit\EditorsNet\EditDev.csproj. When Model Explorer is being launched KernelCAD checks first for the customised version. If it is not present, the installed version is loaded
|