Cells

From Microstation VBA Wiki
Revision as of 12:22, 5 August 2010 by Ted (talk | contribs) (Created page with 'Placing a cells is similar to placing [[lines] in that both are elements. First you store the cell into a variable then you put that variable into the drawing. <PRE> Dim oCell a…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Placing a cells is similar to placing [[lines] in that both are elements. First you store the cell into a variable then you put that variable into the drawing.

Dim oCell as CellElement

It makes sense that you would need a point defined just like when your draw a line. But you also have to have a special kind of point called a scaling point and because you can bring a cell in at an angle, you also need a rotation matrix. If you want to keep it simple and bring the cell in at a scale of one with no rotation you can set up a point variable and a matrix and then set them to some standard values like this:

Dim ptScale As Point3d
Dim oMatrix As Matrix3d

ptScale = ActiveSettings.Scale
oMatrix = Matrix3dIdentity