ILine Interface

ILine Interface | Send Feedback
See Also Members Example

Allows access to a Line.

# Syntax

Visual Basic |
--- | ---
    Public Interface ILine

C# |
--- | ---
    public interface ILine

JavaScript |
--- | ---
    Object dsLine

COM native C++ |
--- | ---
    interface ILine

C++ |
--- | ---
    class dsLine

# Example

#### COM native C++

If the selected object is an ILine object, then get the object.

...
//Write number of selected objects to output file
long selCount = dsSelManager->GetSelectedObjectCount( dsSelectionSetType_Current );
strPrint.Format( L"Selected objects: (%d):\r\n", selCount );
fileOutput.WriteString( strPrint );
if( selCount > 0 )
{
for( long i = 0; i < selCount; ++i )
{
//Get selected object type
dsObjectType_e retObjType;
IDispatchPtr selObj = dsSelManager->GetSelectedObject( dsSelectionSetType_Current, i, &retObjType );
//If selected object is Line entity
if( dsLineType == retObjType )
{
ILinePtr dsLine( selObj );
strPrint.Format( L"Line\r\n" );
fileOutput.WriteString( strPrint );
//Do dump for Line entity
//See the entity's Layer, LineScale, LineStyle, LineWeight,
//or Visible property for the DumpGraphicsEntity template
CAddinDumpManager::DumpGraphicsEntity<ILinePtr>( dsLine, fileOutput );
...

# Example

Construct Line (C#)
Construct Line (VB.NET)
Construct Line (VBA)
Insert and Dimension Sketch (JavaScript)
Insert Lines and Angular Dimension (JavaScript)

# Accessors

IDocument::GetObjectByHandle

ISelectionManager::GetSelectedObject

ISelectionManager::GetSelectedObjects

ISketchManager::GetEntities

ISketchManager::InsertLine

# Object Model

Line

# See Also

####

ILine Members
Interop.dsAutomation Namespace
IInfiniteLine Interface
IPolyLine Interface
IRay Interface
IPolyLine3D Interface
ILineStyle Interface
ILineStyleManager Interface
ITrace Interface