All Frameworks  Object Hierarchy  This Framework  Previous  Next  Indexes  

ShapeInstance (Object)

IUnknown
  |
  +---IDispatch
    |
    +---CATBaseUnknown
      |
      +---CATBaseDispatch
        |
        +---AnyObject
          |
          +---Shape
            |
            +---ShapeInstance
 


The interface to access a CATIAShapeInstance.

Property Index

InputsCount
Returns the number of Inputs.
OutputsCount
Returns the number of Outputs.
ParametersCount
Returns the number of Parameters.

Method Index

GetInput
Gets an input of a shape instance by its name.
GetInputData
Gets an input of a shape instance by its name.
GetInputDataFromPosition
Gets an input of a hybrid shape instance from its position.
GetInputFromPosition
Gets an input of a hybrid shape instance from its position.
GetOutput
Gets a Ouput by its name.
GetOutputFromPosition
Gets a Ouput from its position.
GetParameter
Gets a parameter of a shape instance by its name.
GetParameterFromPosition
Gets a parameter of a hybrid shape instance from its position.
PutInput
Defines an input of a shape instance.
PutInputData
Defines an input of a shape instance.

Properties


o Property InputsCount() As long (Read Only)
Returns the number of Inputs.
Example:
The following example retrieves in inputsCount the number of Inputs of hybridShapeInstance:
 inputsCount = hybridShapeInstance.InputsCount
 
o Property OutputsCount() As long (Read Only)
Returns the number of Outputs.
Example:
The following example retrieves in outputsCount the number of Outputs of hybridShapeInstance:
 outputsCount = hybridShapeInstance.OutputsCount
 
o Property ParametersCount() As long (Read Only)
Returns the number of Parameters.
Example:
The following example retrieves in parametersCount the number of parameters of hybridShapeInstance:
 parametersCount = hybridShapeInstance.ParametersCount
 

Methods


o Func GetInput(CATBSTR iName) As CATIABase
Gets an input of a shape instance by its name.
Parameters:
iName
The name of the input of the shape instance
Returns:
The input, if found
Example:
The following example tests if the input was found:
 Set input = shapeInstance.GetInput("Input1")
 If TypeName(input)="Nothing" Then
      MsgBox "Input not found"
 End If
 
o Func GetInputData(CATBSTR iName) As CATBaseDispatch
Gets an input of a shape instance by its name. Use this method if you want to retrieve a Reference.
Parameters:
iName
The name of the input of the shape instance
Returns:
The input, if found
Example:
The following example tests if the input was found:
 Set input = shapeInstance.GetInput("Input1")
 If TypeName(input)="Nothing" Then
      MsgBox "Input not found"
 End If
 
o Func GetInputDataFromPosition(long iPosition) As CATBaseDispatch
Gets an input of a hybrid shape instance from its position. Use this method if you want to retrieve a Reference.
Parameters:
iPosition
The position
Returns:
The input, if found
Example:
The following example tests if the input was found:
 Set input = hybridShapeInstance.GetInputFromPosition(2)
 If TypeName(input)="Nothing" Then
      MsgBox "Input not found"
 End If
 
o Func GetInputFromPosition(long iPosition) As CATIABase
Gets an input of a hybrid shape instance from its position.
Parameters:
iPosition
The position
Returns:
The input, if found
Example:
The following example tests if the input was found:
 Set input = hybridShapeInstance.GetInputFromPosition(2)
 If TypeName(input)="Nothing" Then
      MsgBox "Input not found"
 End If
 
o Func GetOutput(CATBSTR iName) As CATIABase
Gets a Ouput by its name.
Parameters:
iName
The name of the output of the shape instance
Returns:
The output, if found
Example:
The following example tests if the output was found:
 Set output = shapeInstance.GetOuput("Output1")
 If TypeName(output)="Nothing" Then
      MsgBox "Output not found"
 End If
 
o Func GetOutputFromPosition(long iPosition) As CATIABase
Gets a Ouput from its position.
Parameters:
iPosition
The position
Returns:
The output, if found
Example:
The following example tests if the output was found:
 Set output = shapeInstance.GetOuputFromPosition(2)
 If TypeName(output)="Nothing" Then
      MsgBox "Output not found"
 End If
 
o Func GetParameter(CATBSTR iName) As CATIABase
Gets a parameter of a shape instance by its name.
Parameters:
iName
The name of the parameter of the shape instance
Returns:
The parameter, if found
Example:
The following example tests if the parameter was found:
 Set parameter = shapeInstance.GetParameter("Parameter1")
 If TypeName(parameter)="Nothing" Then
      MsgBox "Parameter not found"
 End If
 
o Func GetParameterFromPosition(long iPosition) As CATIABase
Gets a parameter of a hybrid shape instance from its position.
Parameters:
iPosition
The position
Returns:
The parameter, if found
Example:
The following example tests if the parameter was found:
 Set parameter = hybridShapeInstance.GetParameterFromPosition(2)
 If TypeName(input)="Nothing" Then
       MsgBox "Parameter not found"
 End If
 
o Sub PutInput(CATBSTR iName,
CATIABase iInput)
Defines an input of a shape instance.
Parameters:
iName
The input name
iInput
The element wich will be input of the shape instance
All types of
Boundary object are possibly supported.
Example:
The following example defines the input of a shape instance The input will be a point and its name will be Input1.
 shapeInstance.PutInput "Input1",point
 
o Sub PutInputData(CATBSTR iName,
CATBaseDispatch iInput)
Defines an input of a shape instance. Use this method if you want to set as input a Reference.
Parameters:
iName
The input name
iInput
The element wich will be input of the shape instance
All types of
Boundary object are possibly supported.
Example:
The following example defines the input of a shape instance The input will be a point and its name will be Input1.
 shapeInstance.PutInput "Input1",point
 

Copyright © 2003, Dassault Systèmes. All rights reserved.