Cell Feature


In this Example learn how to work with the Cell Feature from Microstation in to GC.

Created by Carlos Gonzalez

File Example

1. First step is generate a CELL inside Microstation.

-Open a new dwg file inside Microstation

-Draw your objects before you convert it to a cell.

-From MicroStation menu, select element>cells. The cell library dialog box will be opened. Take a look to the dialog title. It says cell library: [NONE].

no_cell_library_attached

It means that we haven’t attached any cell library yet. From this dialog menu, click file>new. Type a name for the new cell library. Something like Training Cell will do. Click save. (This is the library that you will need to place the CELL inside GC, the file has to be saved in the same folder as the GC file)

-The create cell button is disabled. We need to define the cell origin before we start creating it.  From navigation taskclick and hold on place active cell, choose define cell origin from the drop down menu.

-Place the origin at the center of the symbol. Origin is the base point or reference point that you will use when placing the cell inside GC. 

-Click the create button. Give the cell proper name and description. (This is the name that you will need to place the CELL inside GC)

 

 2. Place the Cell inside GC by Coordinate System Or Point With Optional Scaling.

-transaction modelChange "place cell"
{
    node Bentley.GC.UI.Example.Objects.cell01 Bentley.GC.Features.Cell
    {
        Placement                 = baseCS;
        CellName                  = "my_cell"; This is the name of the CELL created in Microstation
        LibraryName               = ".\\cellLibrary.cel"; This is name of the library created in the dwg file, this file has to be in the same folder as the GC file 
    }
}

 

To place the cell you can use a single point, or a series of points in a line or using a surface to create points using UV values. If you want to scale and rotate each CELL, use a universal coordinate system on a point grid!