
This method 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 by a standard preset (SW, NW, Top, Front, etc.
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] [Optional] nPresetView [as Integer] [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] [Optional] nPresetView [as Integer] [Optional] rZoomFactor [as Real] ) |
Copy Code |
|---|
; Display this block from the top (Odcl_BlockView_DisplayBlockToScale MyProject_MyForm_MyControl "Block1" 0) |