IRay Interface

IRay Interface | Send Feedback
See Also Members Example

Allows access to a Ray.

# Syntax

Visual Basic |
--- | ---
    Public Interface IRay

C# |
--- | ---
    public interface IRay

JavaScript |
--- | ---
    Object dsRay

COM native C++ |
--- | ---
    interface IRay

C++ |
--- | ---
    class dsRay

# Example

#### COM native C++

If the selected object is an IRay 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 an Ray entity
if(dsRayType == retObjType )
{
IRayPtr dsRay( selObj );
strPrint.Format( L"Ray\r\n" );
fileOutput.WriteString( strPrint );
//Do dump for Ray entity
//See the entity's Layer, LineScale, LineStyle, LineWeight,
//or Visible property for the DumpGraphicsEntity template
CAddinDumpManager::DumpGraphicsEntity<IRayPtr>( dsRay, fileOutput );
...

# Example

Insert Ray (C#)
Insert Ray (VB.NET)
Insert Ray (VBA)

# Accessors

IDocument::GetObjectByHandle

ISelectionManager::GetSelectedObject

ISelectionManager::GetSelectedObjects

ISketchManager::GetEntities

ISketchManager::InsertRay

# Object Model

Ray

# See Also

####

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