Dim InputObjectType(1)
Set Document = CATIA.ActiveDocument
Set Selection = Document.Selection
Set HybridBodies = Document.Part.HybridBodies
Set HybridBody = HybridBodies.Item("Open_body.1")
InputObjectType(0)="TriDimFeatEdge"
InputObjectType(1)="BiDimFeatEdge"
Status=Selection.SelectElement2(InputObjectType,"Select an edge",true)
if (Status = "cancel") then Exit Sub
Set Curve = Selection.Item(1).Value
Set HybridShapePointOnCurve = HybridShapeFactory.AddNewPointOnCurveFromDistance(Curve,18.0,False)
HybridBody.AppendHybridShape HybridShapePointOnCurve
Document.Part.InWorkObject = HybridShapePointOnCurve
Document.Part.Update
问一个比较菜的问题,代码是:
Dim BOM As Object
Sub CATMain()
Set BOM = CreateObject("BOMDll.BOMSheet")
Dim Value
Set Value = BOM.Display()
End Sub
其中BOM是我用VC开发的一个自动化对象,方法void Display(void)
运行结束时,系统提示:运行时错误‘13’:
类型不匹配
请问这是怎么回事?