Model.hm_getsketchdata#

Model.hm_getsketchdata(entity_id=0, entity_type='none', id=0, sketchdata='', name='', file_name='')#

Queries the information about the entities present in the sketch data.

Parameters:
  • entity_id (int) – nan

  • entity_type (hwString) – The type of queried entity present in the sketch.

  • id (int) – The ID of the sketch entity. Provided if name is not provided.

  • sketchdata (hwString) – The queried sketch entity data name.

  • name (hwString) – The name of the sketch entity. Provided if id is not provided.

  • file_name (hwString) – Reserved for future development. Should be set to “”.

Returns:

  • hwReturnStatus - Status object

  • HmQueryResult - Result object containing the output values:

    • Keys valid for sketchdata="entity_list"

      • result (numpy.ndarray)

    • Keys valid for sketchdata="type"

      • result (list of strings)

    • Keys valid for sketchdata="start_position"

      • result (numpy.ndarray)

    • Keys valid for sketchdata="is_fixed"

      • result (numpy.ndarray)

    • Keys valid for sketchdata="is_construction"

      • result (numpy.ndarray)

    • Keys valid for sketchdata="point_position"

      • result (numpy.ndarray)

    • Keys valid for sketchdata="line_position"

      • result (numpy.ndarray)

    • Keys valid for sketchdata="line_direction"

      • result (numpy.ndarray)

    • Keys valid for sketchdata="end_position"

      • result (numpy.ndarray)

    • Keys valid for sketchdata="start_point"

      • result (numpy.ndarray)

    • Keys valid for sketchdata="end_point"

      • result (numpy.ndarray)

    • Keys valid for sketchdata="length"

      • result (numpy.ndarray)

    • Keys valid for sketchdata="angle"

      • result (numpy.ndarray)

    • Keys valid for sketchdata="is_bounded"

      • result (numpy.ndarray)

    • Keys valid for sketchdata="center_position"

      • result (numpy.ndarray)

    • Keys valid for sketchdata="center_point"

      • result (numpy.ndarray)

    • Keys valid for sketchdata="radius"

      • result (numpy.ndarray)

    • Keys valid for sketchdata="start_angle"

      • result (numpy.ndarray)

    • Keys valid for sketchdata="end_angle"

      • result (numpy.ndarray)

    • Keys valid for sketchdata="sweep_angle"

      • result (numpy.ndarray)

    • Keys valid for sketchdata="is_counterclockwise"

      • result (numpy.ndarray)

    • Keys valid for sketchdata="major_radius"

      • result (numpy.ndarray)

    • Keys valid for sketchdata="minor_radius"

      • result (numpy.ndarray)

    • Keys valid for sketchdata="vertical_axis"

      • result (numpy.ndarray)

    • Keys valid for sketchdata="degree"

      • result (numpy.ndarray)

    • Keys valid for sketchdata="is_periodic"

      • result (numpy.ndarray)

    • Keys valid for sketchdata="is_interpolated"

      • result (numpy.ndarray)

    • Keys valid for sketchdata="is_externalref"

      • result (numpy.ndarray)

    • Keys valid for sketchdata="pattern_type"

      • result (list of strings)

    • Keys valid for sketchdata="number_directions"

      • result (numpy.ndarray)

    • Keys valid for sketchdata="pattern_angle"

      • result (numpy.ndarray)

    • Keys valid for sketchdata="dir1_distance"

      • result (numpy.ndarray)

    • Keys valid for sketchdata="dir2_distance"

      • result (numpy.ndarray)

    • Keys valid for sketchdata="dir1_copies_count"

      • result (numpy.ndarray)

    • Keys valid for sketchdata="dir2_copies_count"

      • result (numpy.ndarray)

    • Keys valid for sketchdata="constraint_type"

      • result (list of strings)

    • Keys valid for sketchdata="constraint_entities"

      • result (numpy.ndarray)

    • Keys valid for sketchdata="variable_name"

      • result (list of strings)

    • Keys valid for sketchdata="dim_value"

      • result (numpy.ndarray)

    • Keys valid for sketchdata="is_dimdriven"

      • result (numpy.ndarray)

    • Keys valid for sketchdata="is_dimension"

      • result (numpy.ndarray)

    • Keys valid for sketchdata="spline_points"

      • result (numpy.ndarray)

    • Keys valid for sketchdata="spline_positions"

      • result (numpy.ndarray)

Example#

Query the list of point IDs from sketch ID 1#
import hm
import hm.entities as ent

model = hm.Model()

_, result = model.hm_getsketchdata(id=1, entity_type="point", sketchdata="entitylist")

print("List of point ids:", result.result)