我正在为SM3D创建一个符号。端口创建总是失败。我不知道为什么。我的零件类只有一个端口。我已经改变了一切。请帮助!!!
这是我的代码:
Protected Overrides Sub ConstructOutputs()
MyBase.ConstructOutputs()
Try
Dim Objeto As Part = InputVar.Value
Dim SymbolCreator As New SymbolGeometryHelper
EcoOut.Outputs("Princ") = SymbolCreator.CreateSphere(OccurrenceConnection, 0.001)
EcoOut.Outputs("Port1") = New PipeNozzle(InputVar.Value, MyBase.OccurrenceConnection, True, 0, New Position(0, 0, 0), New Vector(1, 0, 0), 0.0, True)
...
谢谢, 涡
答案 0 :(得分:3)
您案例的解决方案非常简单...... Smart Marine中的端口始终从1开始。因此,您所要做的就是在创建PipeNozzle时更改此参数:
Protected Overrides Sub ConstructOutputs()
MyBase.ConstructOutputs()
Try
Dim Objeto As Part = InputVar.Value
Dim SymbolCreator As New SymbolGeometryHelper
EcoOut.Outputs("Princ") = SymbolCreator.CreateSphere(OccurrenceConnection, 0.001)
EcoOut.Outputs("Port1") = New PipeNozzle(InputVar.Value, MyBase.OccurrenceConnection, True, 1, New Position(0, 0, 0), New Vector(1, 0, 0), 0.0, True)
更改它,这将会起作用!