SketchLines.addTwoPointRectangle Method

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

Description

Creates four sketch lines representing a rectangle where the two points are the opposing corners of the rectangle. The input points can be either existing SketchPoints or Point3D objects. If a SketchPoint is used the new lines will be based on that sketch point and update if the sketch point is modified.

Syntax

"sketchLines_var" is a variable referencing a SketchLines object.

returnValue = sketchLines_var.addTwoPointRectangle(pointOne, pointTwo)
"sketchLines_var" is a variable referencing a SketchLines object.

#include <Fusion/Sketch/SketchLines.h>

returnValue = sketchLines_var->addTwoPointRectangle(pointOne, pointTwo);
"sketchLines_var" is a variable referencing a SketchLines object.

returnValue = sketchLines_var.addTwoPointRectangle(pointOne, pointTwo);

Return Value

Type Description
SketchLineList Returns the four new sketch lines or null if the creation failed.

Parameters

Name Type Description
pointOne Base The first corner of the rectangle. It can be a SketchPoint or Point3D object.
pointTwo Base The second corner of the rectangle. It can be a SketchPoint or Point3D object.

Samples

Name Description
API Sample that demonstrates creating sketch lines in various ways.

Demonstrates several ways to create sketch lines, including as the result of creating a rectangle.

Before running: No open document is required; the script creates a new design (or additional documents) as it runs.

Sketch Chamfer API Sample

Demonstrates creating a new sketch point.

Before running: Run from Scripts and Add-Ins. This sample may open dialogs or require interactive choices; keep Fusion in the foreground. No open document is required; the script creates a new design (or additional documents) as it runs.

Version

Introduced in version August 2014