[MStn CE U13] Access to elements in Parametric cell

Hi,

this my question is one from "best practices questions" (and also about feature design), not specifically targeted to C++ or NET API (I did tests using C#):

Question: Is it possible to access elements inside parametric cell instance?

Why: In some scenarios, it would be nice to have a parametric cell with attached custom data (XAttributes or EC data) inside and to access the data after the cell is placed.

Now (see this my post in MicroStation forum) it seems that to attach EC data to elements or to cell (model) is not supported and when the instance is created, the cell definition content is "black boxed" and not available.

What I tried: I think, after reading C++ API doc and implementing some tests in C#, I understand how parametric cells persistence is implemented:

  • When the parametric cell is placed, the instance is created in dictionary model (but ParametricCellDefinitionElement (ParametricCellDefHandler) returns default model as its container?), so it's not "visible".
  • Similarly to shared cells, the parametric cell instance is represented by ParametricCellElement (ParametricCellHandler).
  • It's possible, using classes like ParametricCellDefinitionElement, PrametricCellinfo etc., to obtain the cell details like variables, location, transformation....
  • Using ElementGraphicsProcess, it's also possible to receive the cell geometry.

But there is no way to obtain source definition (elements, constraints...) from instance or hidden cell definition, and to check whether custom data has been attached to the cell. Even EC representation does not provide any details.

Is it "by design", so it's not possible to go inside the cell and custom data can be attached only after the cell is placed (so they will be attached to the instance element)?

With regards,

  Jan

Parents Reply Children
No Data