UCM TMATRX to VBA CE conversion

I've been given an old User Command to reprogram in VBA so that it functions in MS CE.

The User Command places cells using a transformation matrix to mimic placement on either the top, left, or right planes in a 2D model. 

The part I'm having a problem deciphering is this series of statements

SET TMATRX(1) = XAXSCL * A3
SET TMATRX(2) = YAXSCL * A5
SET TMATRX(3) = XAXSCL * A2
SET TMATRX(4) = YAXSCL * A4

I get the how to replicate the replications on the right side of the = sign.

How do the TMATRX(1) -> TMATRX(4) values translate to a MicroStation VBA Transform3d?

Parents
  • Hi Rod,

    I've been given an old User Command to reprogram in VBA so that it functions in MS CE.

    My experience, not specific to UCM > VBA, but general, when not similar languages or environments are used, is to focus on functionality, not original code. Otherwise there is a threat the new code will follow too much another, not own, philosophy.

    The part I'm having a problem deciphering is this series of statements

    It looks like it sets transformation matrix as a multiplication of x (or y) active scale and some variable (A2 ... A5).

    How do the TMATRX(1) -> TMATRX(4) values translate to a MicroStation VBA Transform3d?

    I remember literally nothing from UCM ;-) but as I wrote above, important is functionality, not UCM code.

    In MicroStation VBA, there are many functions available to set rotation and transformation matrices.

    Regards,

      Jan

Reply
  • Hi Rod,

    I've been given an old User Command to reprogram in VBA so that it functions in MS CE.

    My experience, not specific to UCM > VBA, but general, when not similar languages or environments are used, is to focus on functionality, not original code. Otherwise there is a threat the new code will follow too much another, not own, philosophy.

    The part I'm having a problem deciphering is this series of statements

    It looks like it sets transformation matrix as a multiplication of x (or y) active scale and some variable (A2 ... A5).

    How do the TMATRX(1) -> TMATRX(4) values translate to a MicroStation VBA Transform3d?

    I remember literally nothing from UCM ;-) but as I wrote above, important is functionality, not UCM code.

    In MicroStation VBA, there are many functions available to set rotation and transformation matrices.

    Regards,

      Jan

Children
No Data