for_rendering_by_height method

for_rendering_by_height

Initializes a CadOptions instance for rendering by height.

For code example, see the documentation.

def for_rendering_by_height(cls, height):
    ...
Parameter Type Description
height int The height of the output result (in pixels).

Returns: CadOptions: New instance configured for rendering by height.

Raises Description
ValueError When height is less than or equal to zero.

Example

from groupdocs.viewer import Viewer
from groupdocs.viewer.options import PngViewOptions, CadOptions

def render_by_height():
    with Viewer("sample.dwg") as viewer:
        png_options = PngViewOptions("output_by_height.png")
        png_options.cad_options = CadOptions.for_rendering_by_height(1500)
        viewer.view(png_options)

See Also