
This method loads an external drawing file into the control for display just as the BlockView control displays other blocks. This method will allow the camera viewing angle to be set manually by submitting the offset vector camera placement in relation from the center of the block. When this method is called the block will always be zoomed to its extents unless the zoom factor argument has been submitted.
If the zoom factor has been included then the block is scaled according to the zoom extents. For example: 1.0 = zoomed to extents, 0.5 = 1/2 the zoom extents making the block half the size and 2.0 = doubles the extents making the block zoomed in.
Returns the following according to the situation:
The recommended convention is passing the control identifier directly:
Copy Code |
|---|
(Odcl_BlockView_LoadDwg MyControlReference [as Reference] sDwgFileName [as String] rCameraXOffset [as Real] rCameraYOffset [as Real] [Optional] rCameraZOffset [as Real] [Optional] rZoomFactor [as Real] ) |
An alternative convention is to identify the control by providing the project file, the dialog name and the control name:
Copy Code |
|---|
(Odcl_BlockView_LoadDwg ProjectFile [as String] DialogName [as String] ControlName [as String] sDwgFileName [as String] rCameraXOffset [as Real] rCameraYOffset [as Real] [Optional] rCameraZOffset [as Real] [Optional] rZoomFactor [as Real] ) |
Copy Code |
|---|
; Load the drawing and set the camera position (Odcl_BlockView_LoadDwg MyProject_MyForm_MyControl "Structural - Metric.dwg" 10 5) |