Aleks_TS
Mechanical
- Jul 5, 2020
- 22
Hi all
I have an error in Visual Studio that "Set" and "Let" commands are no longer supported. Does anyone know which command I should use?
Here is one small example of the code in VB and what would be the code in Visual Studio?
Sub CATMain()
Dim partDocument1 As PartDocument
Set partDocument1 = CATIA.ActiveDocument
Dim part1 As Part
Set part1 = partDocument1.Part
Dim hybridBodies1 As HybridBodies
Set hybridBodies1 = part1.HybridBodies
Dim hybridBody1 As HybridBody
Set hybridBody1 = hybridBodies1.Add()
part1.UpdateObject hybridBody1
End Sub
Thanks
I have an error in Visual Studio that "Set" and "Let" commands are no longer supported. Does anyone know which command I should use?
Here is one small example of the code in VB and what would be the code in Visual Studio?
Sub CATMain()
Dim partDocument1 As PartDocument
Set partDocument1 = CATIA.ActiveDocument
Dim part1 As Part
Set part1 = partDocument1.Part
Dim hybridBodies1 As HybridBodies
Set hybridBodies1 = part1.HybridBodies
Dim hybridBody1 As HybridBody
Set hybridBody1 = hybridBodies1.Add()
part1.UpdateObject hybridBody1
End Sub
Thanks