
loads a block from the current drawing or pre-loaded dwg file into the control for display at an exact scale. 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.
To set the exact scale the zoom factor argument can be calculated as Units per Pixel. So for example a 10 inch by 10 inch block displayed with a value of 0.5 will display about 20 pixels by 20 pixels (+ or - one pixel) in size in the control.
ZoomFactor = Actual Units / ScreenUnits
Returns the following according to the situation:
The recommended convention is passing the control identifier directly:
Copy Code |
|---|
(Odcl_BlockView_DisplayBlockToScale MyControlReference [as Reference] sBlockName [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_DisplayBlockToScale ProjectFile [as String] DialogName [as String] ControlName [as String] sBlockName [as String] rCameraXOffset [as Real] rCameraYOffset [as Real] [Optional] rCameraZOffset [as Real] [Optional] rZoomFactor [as Real] ) |
Copy Code |
|---|
; Display this block (Odcl_BlockView_DisplayBlockToScale MyProject_MyForm_MyControl "Block1" 10 5) |