IGeometricObject_DG method errors
Posted: Sun Feb 09, 2025 3:02 pm
In the recent 7.2 updates, the IGeometricObject_DG.Rotate1 function is now throwing a "missing arguments" error. Yet, the VB6 object browser for ActiveX build 5555 shows the argument definition I've been using. (Also, I see in the most recent online documentation, that Rotate1 is no longer shown, but curiously there are four Rotate function with different arguments.) The function to clone an object and rotate the clone around the X axis is:
Thanks!
Code: Select all
Private Sub CloneComponent(ByVal strComponentName As String, ByVal intBladeNumber As Integer, ByVal dblRotateRads As Double)
Dim MyComponentEntity As IEntity_DG
Dim MyTransform As IGeometricObject_DG
On Error GoTo ErrorHandler
' clone component
Set MyComponentEntity = MyModel3D.GetEntity(strComponentName).Clone
If (MyComponentEntity Is Nothing) Then
Debug.Assert False
Else
Call MyComponentEntity.SetName(strComponentName & Format$(intBladeNumber))
' rotate
Set MyTransform = MyComponentEntity
Call MyTransform.Rotate1(dblRotateRads, 1, 0, 0) ' rotate on X axis - **** ERROR THIS LINE
' add to main model
Call MyModel3D.AddEntity(MyComponentEntity)
End If
Exit Sub
ErrorHandler:
Select Case ShowCriticalErrorHandler("cloning component")
Case idReturnRetry
Resume
Case idReturnIgnore
Resume Next
End Select
End Sub