DGKC Control Documentation


Skip Navigation Links.
Start page
Quick Start
Search Page
Installation
What is new
Licensing
Expand ModelsModels
Collapse DG Kernel ControlDG Kernel Control
Expand API ReferenceAPI Reference
Expand Samples and TutorialsSamples and Tutorials
Expand GraphicsGraphics
Expand Math ObjectsMath Objects
Expand DeprecatedDeprecated
Redistribution
Model Viewer
Support
Skip Navigation LinksHome Page > DG Kernel Control > Properies, Methods, Events > Properies Go to ActiveX docs Search Documentation


Properties of DGKC Control

Properties:

ModelPath
ShowGlobalAxes
RenderSolid
See also: Methods, Events

ModelPath Property

Type: String
 
Remarks:
 
ModelPath string is the main property of the control. It contains the path of an existing model file or empty string. When the property is assigned a new value the control automatically loads the model and updates the 3D window. A message is displayed if the load fails. Use the SaveAs method to save the current model in a new location and change the ModelPath property at the same time.
ModelPath can be either relative or full path (with drive letter or starting with hash). There are two kinds of relative paths:
 
1) Standard (like Models\Cube.mdg), which is relative to the installation folder. The control reads the location of the installation folder from the registry. For an example KerCADne.ocx reads the installation directory from the "InstallDir" string of the "HKEY_LOCAL_MACHINE\SOFTWARE\DInsight\KerCADne\6.0" key. This value can be set in installation packages for distribution of the application developed with DGKC, when control is not installed but only registered on the target computer. It is not recommended to modify the key with DGKC installed.
 
2) Relative path with modifier prefix, which specified the root. Currently supported modifiers are:    

(a) <EXEPATH>. Path <EXEPATH>Models\Samples\Lines.mdg means that the lines,mdg is located in the Models\Samples subdirectory of the folder where the application's executable (.exe) file is located. Note that at design time control does not display any model when the Model Path has <EXEPATH> modifier. The <EXEPATH> modified paths are useful for distributing applications where location of the target directory is normally not known in advance.
   
(b) <OCXPATH>. Path <OCXPATH>Models\Std.mdg means that the Std,glm is located in the Models\ subdirectory of the folder where the control's executable (.ocx) file is located. 
 
The model path can be an empty string, in which case the DGKC component will not attempt to load any file on start of the application, the model will have no objects and 3D window will be empty. This option can be useful when the model is constructed dynamically using Dynamic Object Creation to avoid references to external files or other reasons. Note that a model file is valid even if the saved model is empty (has no objects).

ModelPath strings for Pro level components must have .mdg extension. DGKC Enterprise component can load and save files with other extensions. Supported formats are enumerated by the ECADFormat enumeration

When the control is being inserted for the first time into a form or dialogue or created dynamically the default value of the property is taken from the Registry (see below). If the correspondent registry values are not present the ModelPathis set to empty string.

The default value of ModelPath is constructed by appending DefaultModel registry value from HKEY_LOCAL_MACHINE\SOFTWARE\DInsight\KernCAD\<version> key to InstallDir path string in the same key. For controls different from standard DGKC the "KernCAD" key name above should be replaced with specific ocx name. InstallDir and DefaultModel values can be changed (for controls only) to any suitable locations.


 
ShowGlobalAxes Property
 
Type: Boolean
 
Remarks:
 
If this property is set to true the global axes will appear in the control's window.

 
RenderSolid Property
 
Type: Boolean
 
Remarks:
 
If this property is false the model will be displayed in wire frame. Otherwise it will be displayed as a solid object (Default).