ImportOptions.isViewFit Property

Parent Object: ImportOptions
Defined in namespace "adsk::core" and the header file is <Core/Application/ImportOptions.h>

Description

Specifies if the camera should be adjusted to fit the geometry of the import. This defaults to true, which will cause a change in the current view. Setting this to false will leave the view as-is and just import the geometry.

Syntax

"importOptions_var" is a variable referencing an ImportOptions object.
# Get the value of the property.
propertyValue = importOptions_var.isViewFit

# Set the value of the property.
importOptions_var.isViewFit = propertyValue
"importOptions_var" Is a variable referencing an ImportOptions Object.
#include <Core/Application/ImportOptions.h>

// Get the value of the property.
boolean propertyValue = importOptions_var->isViewFit();

// Set the value of the property, where value_var is a boolean.
bool returnValue = importOptions_var->isViewFit(value_var);
"importOptions_var" Is a variable referencing an ImportOptions Object.
// Get the value of the property.
propertyValue = importOptions_var.isViewFit;

// Set the value of the property.
importOptions_var.isViewFit = propertyValue;

Property Value

This is a read/write property whose value is a boolean.

Samples

Name Description
Import Manager API Sample

Demonstrates ImportManager for IGES, STEP, SAT, SMT, Fusion archive (F3D), and DXF 2D import, including importToNewDocument, importToTarget, and ImportOptions.isViewFit.

Before running: The sample paths point at neutral-format test files under Core/Neutron/Test/APITest/ (for example APISampleImportNeutralIgs.igs). When you run the script yourself, either place equivalent files at those paths or edit the file paths in the sample. The automation test uses paths relative to the script via TestUtils. Imports create new documents or add to the active design depending on the section you run.

Version

Introduced in version May 2017