I've posted some articles about using matrices and transforms with MicroStation VBA to rotate or move (translate) a DGN element.
The articles explain the purpose and use of Matrix3d and Transform3d , and how to apply them to an element.
Hi,
I'm struggling with placing a cell along an arc in VBA.
I have a Complex Chain where I will place a cell along the whol chain with a fixed distance.
I have solved the rotation on the "Line" part of the chainm but having trouble with the arc…
Function ConstructMatrix3D (ByVal degrees As Double) As Matrix3D
Dim angle As Double
angle = Radians (degrees)
' Your angle is measured from North, so you may need to subtract 90 degrees if cell is oriented along X axis
angle = angle - Pi()
Const…
Unknown said: How to tell if your cursor is to the left or right of a point?
I've written a VBA project that shows how to do that...
The macro works in dynamics. Start by identifying a cell. Move the cursor, and it draws the yellow line from the…
Unknown said:
I have got the following details:
slope angle
angle of the slant edge
width of the roof
width, length, height of the beam
When dealing with 3D geometry, work with vectors, transformations and matrices. MicroStation VBA…
Something like …
Dim origin As Point3d
origin = oElement.Origin
Dim offset As Point3d
offset = Point3dSubtract (Point3dZero, origin)
oElement.Move offset
... do rotation
oElement.Move origin
oElement.Rewrite
You haven't told us how you…
Initialise Data Correctly
Dim rotMatrix As Matrix3d ... Set myCir = CreateEllipseElement2(Nothing, myCen, 0.068, 0.068, rotMatrix)
You use a rotation matrix without initialising that variable.
When you declare a variable and don't assign it a…
Both the order of rotation and the centre of rotation are important in 3D.
In 2D it's much simpler. In 4D it's beyond human comprehension 8-)
I'd start with 2D, just to keep things as simple as possible.
When you construct a rotation matrix,…
3D Geometry
Mike:
I am looking to set a rotation using Matrix3d ...
If you are working in 3D then understanding rotation matrices, embodied in VBA as Matrix3d , is vital.
Rotation matrices are pretty well universal in 3D manipulations, and…
VBA Forum
Aravinthkumar:
How can I get rotation value from TextElement .
It returns the value only in Matrix3d .
How can I get it in degrees?
Post questions about MicroStation VBA to the
VBA Forum .
MicroStation is a 3D environment…