Message 1 of 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello everyone,
I've got a question about my code snippet. It's just copied from developer reference:
Dim oTG As TransientGeometry
oTG = ThisApplication.TransientGeometry
Dim dPi As Double
dPi = Atan(1) * 4
' Define the origin point.
Dim oOrigin As Point
oOrigin = oTG.CreatePoint(10, 5, 0)
' Define the axis vectors. Pi/4 is 45 degrees in radians.
Dim oXAxis As UnitVector
Dim oYAxis As UnitVector
Dim oZAxis As UnitVector
oXAxis = oTG.CreateUnitVector(Cos(dPi / 4), Sin(dPi / 4), 0)
oYAxis = oTG.CreateUnitVector(-Cos(dPi / 4), Sin(dPi / 4), 0)
oZAxis = oTG.CreateUnitVector(0, 0, 1)
' Create the matrix and define the desired coordinate system.
Dim oMatrix As Matrix
oMatrix = oTG.CreateMatrix
oMatrix.SetCoordinateSystem(oOrigin, oXAxis.AsVector, oYAxis.AsVector, oZAxis.AsVector)
Dim dd = oMatrix.Cell(0, 0)
But when I call Matrix.Cell(0, 0) I get an error:
Same thing when I call this code by C#. It doesn't work in Inv 2022 and 2023 (other not tested yet).
Am I doing something wrong or is there a bug regarding the Cell property of Matrix?
I've read documentation and it says:
Matrix.Cell( Row As Long, Col As Long ) As Double
So it looks like my code is correct.
Please help.
Regards,
Przemek
Solved! Go to Solution.