Share

SketchLines Object


Description

The SketchLines object provides access to all of the objects in a sketch and provides methods to create additional sketch lines. See the article in the overviews section.

Methods

Name Description
AddAsPolygon Method that creates a polygon with up to 120 sides. The sketch lines representing the polygon are returned.
AddAsThreePointCenteredRectangle Method that creates four lines to represent a rectangle where the center of the rectangle is defined by a point, the length and orientation is defined by a second point, and the width defined by a third point.
AddAsThreePointRectangle Method that creates four lines to represent a rectangle where the base of the rectangle is defined by two points and the height is defined by a third point. The input points for the base can be either Point2d objects defining an X-Y point in space, or an existing SketchPoint object.
AddAsTwoPointCenteredRectangle Method that creates four lines to represent a rectangle where the center of the rectangle is defined by a point and the corner of the rectangle is defined by the second point and the rectangle is aligned with the sketch x and y axes. The input points can be either Point2d objects defining an x-y point in space, or an existing SketchPoint object. If an existing sketch point is input, the lines will become connected to that point. The created sketch lines are returned in a SketchEntitiesEnumerator object. This includes the four lines representing the rectangle and the two internal construction lines.
AddAsTwoPointRectangle Method that creates four lines to represent a rectangle where the diagonal corners of the rectangle are defined by the two input points and the rectangle is aligned with the sketch X and Y axes. The four new sketch lines are returned in an SketchEntitiesEnumerator object.
AddByMidEndPoints Method that creates a new sketch line based on the mid and end points. The new sketch line is returned.
AddByTwoPoints Method that creates a new sketch line based on the two input points. The new sketch line is returned.

Properties

Name Description
Application Returns the top-level parent application object. When used the context of Inventor, an Application object is returned. When used in the context of Apprentice, an ApprenticeServer object is returned.
Count Property that returns the number of items in this collection.
Item Returns the specified SketchLine object from the collection.
Type Returns an ObjectTypeEnum indicating this object's type.

Accessed From

DrawingSketch.SketchLines, PlanarSketch.SketchLines, PlanarSketchProxy.SketchLines, Sketch.SketchLines, SketchBlockDefinition.SketchLines, SketchBlockDefinitionProxy.SketchLines

Samples

Name Description
SurfaceBody Copy This sample demonstrates copying a surface body from one part to another. This is equivalent to the Promote command, but the API is much more flexible. In order for the sample to be self-contained, it creates two parts on the fly that will be used to demonstrate copying a body from one part to another. When copying a body into a part, you provide the surface body and a matrix to define its position in the new part. This sample creates a matrix based on the position of these parts within an assembly.
Using Inventor's error dialog Demonstrates using Inventor's error dialog.
Edit profile of an extrude feature This sample demonstrates editing the profile of an extrude feature.
Create sheet metal face and fold features This sample demonstrates the creation of sheet metal face and fold features.
Create sheet metal lofted flange feature The following sample demonstrates the creation of a sheet metal lofted flange feature.
Sketch Add Oriented This sample demonstrates the creation of a sketch using the Sketches.AddWithOrientation method.
Create sheet metal face and cut features This sample demonstrates the creation of sheet metal face and cut features.
Projection - project across parts This sample demonstrates projecting a sketch entity across parts in an assembly. To use the sample, have an assembly open that contains at least two occurrences, (parts only), and run the program.
Defer sketch updates This sample demonstrates the sketch defer update functionality.
Sketch Lines This sample demonstrates creating lines. It uses all of the various methods to create lines, both singly and as rectangles.
Create and insert a sketch block definition into a part sketch This sample demonstrates inserting a sketch block into a part sketch.
Create sketch block from an existing sketch This sample demonstrates creating a sketch block from an existing sketch.
Create SketchedSymbol Definition This sample illustrates creating a new sketched symbol definition object and inserting it into the active sheet.
Sweep Feature Add This sample demonstrates the creation of a sweep feature. The profile is a circle, but the path is made up of a 3D sketch and a 2D sketch.
Sketch Text Add This sample illustrates creating text in a sketch.
Title Block Definition Create and Insert This sample illustrates creating a new title block definition object and inserting it into the active sheet. This sample consists of two subs. The first demonstrates the creation of a title block definition and the second inserts it into the active sheet.

Version

Introduced in version 5

Was this information helpful?