SketchLines.addByMidpoint Method

Parent Object: SketchLines
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLines.h>

Description

Creates a sketch line where the first point is the midpoint and the second point is one endpoint. The system automatically calculates the other endpoint to create a line where the first point is exactly at the midpoint.

Syntax

"sketchLines_var" is a variable referencing a SketchLines object.
returnValue = sketchLines_var.addByMidpoint(midPoint, secondPoint)
"sketchLines_var" is a variable referencing a SketchLines object.

#include <Fusion/Sketch/SketchLines.h>

returnValue = sketchLines_var->addByMidpoint(midPoint, secondPoint);

Return Value

Type Description
SketchLine Returns the newly created SketchLine object or null if the creation failed.

Parameters

Name Type Description
midPoint Base The midpoint of the line. It can be a SketchPoint or Point3D object.
secondPoint Base One endpoint of the line. It can be a SketchPoint or Point3D object. The other endpoint will be calculated automatically.

Version

Introduced in version January 2026