Quantcast
Channel: MicroStation Programming Forum - Recent Threads
Viewing all articles
Browse latest Browse all 7260

[CONNECT - AddIn] Place cell from cellibrary

$
0
0

I want to perform a very simple task - place a cell from a celllibrary. I got this code:

DPoint3d origin = new DPoint3d(100000,100000);
DPoint3d scale = new DPoint3d(10,10,10);
SharedCellElement cellElm = new SharedCellElement(Session.Instance.GetActiveDgnModel(), null, "BRND", origin, DMatrix3d.Identity, scale);
StatusInt rc = cellElm.AddToModel();

This seems to work fine but the cell is not visible or locatable. The only to locate the cell is to press Crtl + a (to select all elements). In this way I can see that
the origin and scale of the cell is fine, but the range is not OK - range low is 9.223E+15m,9.223E+15m,9.223E+15m and range high is -9.223E+15m,-9.223E+15m,-9.223E+15m.

What am I doing wrong ?

A related question: How can I place an ordinary cell (not shared) ?

TIA, Evan


Viewing all articles
Browse latest Browse all 7260

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>