KLayout Manual: Main Index » Class Index » API reference - Class LoadLayoutOptions

API reference - Class LoadLayoutOptions

Notation used in Ruby API documentation

Description: Layout reader options

This object describes various layer reader options used for loading layouts.

This class has been introduced in version 0.18.

Public constructors

LoadLayoutOptionsnewCreates a new object of this class

Public methods

[const]voidassign(const LoadLayoutOptions other)Assign the contents of another object to self
[const]unsigned intbox_modeSpecifies how to treat BOX records
[const]doublecif_dbuSpecifies the database unit which the reader uses and produces
voidcif_dbu=(double arg1)Specifies the database unit which the reader uses and produces
voidcif_wire_mode=(unsigned int arg1)How to read 'W' objects
voidcreateEnsures the C++ object is created
voidcreate_other_layers=(bool create)Specifies whether other layers should be created.
voiddestroyExplicitly destroy the object
[const]booldestroyed?Returns a value indicating whether the object was already destroyed
[const]LoadLayoutOptionsdupCreates a copy of self
[const]intdxf_circle_pointsSpecifies the number of points used per full circle for arc interpolation
voiddxf_circle_points=(int points)Specifies the number of points used per full circle for arc interpolation
[const]doubledxf_dbuSpecifies the database unit which the reader uses and produces
voiddxf_dbu=(double dbu)Specifies the database unit which the reader uses and produces
[const]booldxf_keep_other_cellsIf this option is true, all cells are kept, not only the top cell and it's children
voiddxf_keep_other_cells=(bool value)If this option is set to true, all cells are kept, not only the top cell and it's children
[const]intdxf_polyline_modeSpecifies whether closed POLYLINE and LWPOLYLINE entities with width 0 are converted to polygons.
voiddxf_polyline_mode=(int mode)Specifies how to treat POLYLINE/LWPOLYLINE entities.
[const]booldxf_render_texts_as_polygonsIf this option is true, text objects are rendered as polygons
voiddxf_render_texts_as_polygons=(bool value)If this option is set to true, text objects are rendered as polygons
[const]doubledxf_text_scalingGets the text scaling factor (see dxf_text_scaling=)
voiddxf_text_scaling=(double unit)Specifies the text scaling in percent of the default scaling
[const]doubledxf_unitSpecifies the unit in which the DXF file is drawn
voiddxf_unit=(double unit)Specifies the unit in which the DXF file is drawn.
[const]boolgds2_allow_big_recordsSpecifies whether to allow big records with a length of 32768 to 65535 bytes.
voidgds2_allow_big_records=(bool arg1)Allow big records with more than 32767 bytes
[const]boolgds2_allow_multi_xy_recordsSpecifies whether to allow big polygons with multiple XY records.
voidgds2_allow_multi_xy_records=(bool arg1)Allows the use of multiple XY records in BOUNDARY elements for unlimited large polygons
voidgds2_box_mode=(unsigned int arg1)Specify how to treat BOX records
[const]boolis_const_object?Returns a value indicating whether the reference is a const reference
[const]boolis_creating_other_layers?Tell whether other layers should be created.
[const]boolis_properties_enabled?Tell whether properties should be read.
[const]boolis_text_enabled?Tell whether text objects should be read.
LayerMaplayer_mapAccess to the layer map member.
voidproperties_enabled=(bool enabled)Specifies whether properties should be read.
voidselect_all_layersSelect all layers
voidset_layer_map(const LayerMap map,
bool create_other_layers)
Set a layer map
voidtext_enabled=(bool enabled)Specifies whether text objects should be read.
[const]unsigned intwire_modeSpecifies how to read 'W' objects

Detailed description

[const] void assign(const LoadLayoutOptions other)

Description: Assign the contents of another object to self

This method assigns the contents of another object to self. This is a deep copy that does not only copy the reference but the actual content.

[const] unsigned int box_mode

Description: Specifies how to treat BOX records

See gds2_box_mode= method for a description of this mode. This property has been added in version 0.18.

[const] double cif_dbu

Description: Specifies the database unit which the reader uses and produces

See cif_dbu= method for a description of this property. This property has been added in version 0.21.

void cif_dbu=(double arg1)

Description: Specifies the database unit which the reader uses and produces

This property has been added in version 0.21.

void cif_wire_mode=(unsigned int arg1)

Description: How to read 'W' objects

This property specifies how to read 'W' (wire) objects. Allowed values are 0 (as square ended paths), 1 (as flush ended paths), 2 (as round paths)

This property has been added in version 0.21.

void create

Description: Ensures the C++ object is created

Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created.

void create_other_layers=(bool create)

Description: Specifies whether other layers should be created.

create:True, if other layers should be created.

void destroy

Description: Explicitly destroy the object

Explicitly destroy the object on C++ side if it was owned by the Ruby interpreter. Subsequent access to this object will throw an exception. If the object is not owned by Ruby, this method will do nothing.

[const] bool destroyed?

Description: Returns a value indicating whether the object was already destroyed

This method returns true, if the object was destroyed, either explicitly or by the C++ side. The latter may happen, if the object is owned by a C++ object which got destroyed itself.

[const] LoadLayoutOptions dup

Description: Creates a copy of self

[const] int dxf_circle_points

Description: Specifies the number of points used per full circle for arc interpolation

This property has been added in version 0.21.6.

void dxf_circle_points=(int points)

Description: Specifies the number of points used per full circle for arc interpolation

This property has been added in version 0.21.6.

[const] double dxf_dbu

Description: Specifies the database unit which the reader uses and produces

This property has been added in version 0.21.

void dxf_dbu=(double dbu)

Description: Specifies the database unit which the reader uses and produces

This property has been added in version 0.21.

[const] bool dxf_keep_other_cells

Description: If this option is true, all cells are kept, not only the top cell and it's children

This property has been added in version 0.21.15.

void dxf_keep_other_cells=(bool value)

Description: If this option is set to true, all cells are kept, not only the top cell and it's children

This property has been added in version 0.21.15.

[const] int dxf_polyline_mode

Description: Specifies whether closed POLYLINE and LWPOLYLINE entities with width 0 are converted to polygons.

See dxf_polyline_mode= for a description of this property.

This property has been added in version 0.21.3.

void dxf_polyline_mode=(int mode)

Description: Specifies how to treat POLYLINE/LWPOLYLINE entities.

The mode is 0 (automatic), 1 (keep lines), 2 (create polygons from closed polylines with width = 0), 3 (merge all lines with width = 0 into polygons), 4 (as 3 plus auto-close open contours).

This property has been added in version 0.21.3.

[const] bool dxf_render_texts_as_polygons

Description: If this option is true, text objects are rendered as polygons

This property has been added in version 0.21.15.

void dxf_render_texts_as_polygons=(bool value)

Description: If this option is set to true, text objects are rendered as polygons

This property has been added in version 0.21.15.

[const] double dxf_text_scaling

Description: Gets the text scaling factor (see dxf_text_scaling=)

This property has been added in version 0.21.20.

void dxf_text_scaling=(double unit)

Description: Specifies the text scaling in percent of the default scaling

The default value 100, meaning that the letter pitch is roughly 92 percent of the specified text height. Decrease this value to get smaller fonts and increase it to get larger fonts.

This property has been added in version 0.21.20.

[const] double dxf_unit

Description: Specifies the unit in which the DXF file is drawn

This property has been added in version 0.21.3.

void dxf_unit=(double unit)

Description: Specifies the unit in which the DXF file is drawn.

This property has been added in version 0.21.3.

[const] bool gds2_allow_big_records

Description: Specifies whether to allow big records with a length of 32768 to 65535 bytes.

See gds2_allow_big_records= method for a description of this property. This property has been added in version 0.18.

void gds2_allow_big_records=(bool arg1)

Description: Allow big records with more than 32767 bytes

Setting this property to true allows larger records by treating the record length as unsigned short, which for example allows larger polygons (~8000 points rather than ~4000 points) without using multiple XY records. For strict compatibility with the standard, this property should be set to false. The default is true.

This property has been added in version 0.18.

[const] bool gds2_allow_multi_xy_records

Description: Specifies whether to allow big polygons with multiple XY records.

See gds2_allow_multi_xy_records= method for a description of this property. This property has been added in version 0.18.

void gds2_allow_multi_xy_records=(bool arg1)

Description: Allows the use of multiple XY records in BOUNDARY elements for unlimited large polygons

Setting this property to true allows big polygons that span over multiple XY records. For strict compatibility with the standard, this property should be set to false. The default is true.

This property has been added in version 0.18.

void gds2_box_mode=(unsigned int arg1)

Description: Specify how to treat BOX records

This property specifies how BOX records are treated. Allowed values are 0 (ignore), 1 (treat as rectangles), 2 (treat as boundaries) or 3 (treat as errors). The default is 1.

This property has been added in version 0.18.

[const] bool is_const_object?

Description: Returns a value indicating whether the reference is a const reference

This method returns true, if self is a const reference. In that case, only const methods may be called on self.

[const] bool is_creating_other_layers?

Description: Tell whether other layers should be created.

Returns:True, if other layers should be created.

[const] bool is_properties_enabled?

Description: Tell whether properties should be read.

Returns:True, if properties should be read.

[const] bool is_text_enabled?

Description: Tell whether text objects should be read.

Returns:True, if text objects should be read.

LayerMap layer_map

Description: Access to the layer map member.

Returns:The layer map.

[static] LoadLayoutOptions new

Description: Creates a new object of this class

void properties_enabled=(bool enabled)

Description: Specifies whether properties should be read.

enabled:True, if properties should be read.

void select_all_layers

Description: Select all layers

This disables any layer map and enables reading of all layers while new layers will be created when required.

void set_layer_map(const LayerMap map,bool create_other_layers)

Description: Set a layer map

map:The layer map to set.@param create_other_layers The flag telling whether other layer should be created also. Set to false if just the layers in the mapping table should be read.

This sets a layer mapping for the reader. The "create_other_layers" specifies whether to create layers that are not in the mapping and automatically assign layers to them.

void text_enabled=(bool enabled)

Description: Specifies whether text objects should be read.

enabled:True, if text objects should be read.

[const] unsigned int wire_mode

Description: Specifies how to read 'W' objects

See cif_wire_mode= method for a description of this mode. This property has been added in version 0.21.