Reporting from Item Types in Cells

I have a cell library in which I have defined Item Types and attached them to an element in the cells so that when they are placed, they will have the Item Types already attached. My aim is to produce a report that contains all the Item Type values along with the X,Y,Z coordinates of the cell origin. My report runs on 'Cells + related items.' which are Item Types. I have added all the columns for cell coordinates & Item Types. When I run the report though my table only populates results related to cell property values & not Item Types. The Item Type values do not come through. In the course of testing I have found that my report will work if I place a cell without an Item Type already attached, and then attach the Item Type after it has been placed. This seem like an unnecessary step, & will not work for me anyway as I am also displaying the Item Types in text field built into the cells. So I can’t add them later. I suspect that I can get it to work if ‘Add related Item’ the correct way. However, when I look at doing this I find myself in an endless loop going through an Item Type into a cel into an Item Type into a cell and so on. The screen capture below hopefully demonstrates this. Hoping for some feedback on how to get this to work.

Parents
  • Hi Jovan,

    I know I am jmping into old discussion, but I was not in office for a few days ;-)

    My aim is to produce a report that contains all the Item Type values along with the X,Y,Z coordinates of the cell origin.

    Something similar to this report?

    When I run the report though my table only populates results related to cell property values & not Item Types.

    It is expected result, because the reported object are cells, whereas you attached Items somewhere inside cells, so they are hidden for the report engine.

    I suspect that I can get it to work if ‘Add related Item’ the correct way.

    I think not, because when you attach Item to an element, there is no simple (direct) relation between cell (represented by cell header) and Item, attached to an element inside cell.

    But I want all this to work with an Item Type already attached within a cell.

    You cannot solve your request with Item, attached to "some element" inside cell. In fact, you can, as demonstrated by Jon, using Expressions, but it has some consequences and limitations.

    & will not work for me anyway as I am also displaying the Item Types in text field built into the cells.

    This assumption is incorrect: To use Items in Text element does not require the data must exist (be attached) inside cell.

    Hoping for some feedback on how to get this to work.

    When you want to report cell properties and Item(s) properties, they must be "on the same level", because there is no way, how to specify relationship "from cell to specific element, with particular Item attached". To be precise, in EC representation such relation exists for sure, it is: cell header > one-to-many relationship to child elements > Item is attached particular child element. But it cannot be queried without code, analyzing to what element the specific Item data is attached.

    The solution is to attach Item not to element inside cell, but to the cell itself. It is similar to what you tried manually: To attach Item to cell header. In terms of a cell in cell library, it requires to attach Item to cell (model), not to an element. When such cell, with Item(s) attached to model, is placed, the definition is converted automatically from "attached to model" to "attached to cell header". It's mentioned also in MicroStation help too. When there is any text, using Item as Field, inside such cell, it works fine too: Filed definition is taken from model, and maintained properly after the cell definition is placed to DGN model.

    At the end, because Item data exist "at cell level", they can be included in report simply.

    With regards,

       Jan

  • Thanks Jan, I realised that I can only achieve what I want with Item Types & Reports by attaching Item Types after the cells have been placed. Being green on Item Types it just wasn't something occurred to me as some sort of limitation. The workflow I would want to achieve would be helped immensely with something like New Idea – MS-I-409.

Reply Children
  • Thanks Jan, I realised that I can only achieve what I want with Item Types & Reports by attaching Item Types after the cells have been placed.

    No, it's just not true.

    I am not sure whether I expressed the information in a wrong way or you did not read what I wrote and linked, but, quoted from MicroStation documentation: Items can be attached to a model within a cell library; every time that model is placed as a cell, the attached items are copied to the new cell. I think Idea MS-I-409 requests the functionality already available in MicroStation.

    Did you try it? Because, when it is possible, I never answer any question without testing of my advice, I tried it. And even when for the first time I probably did something wrong, I was able to do exactly what is in MicroStation documentation. My screen shots I posted above were done using this test case, when I did not do anything after the cells were placed.

    Regards,

      Jan

    Answer Verified By: Jovan Djukanovic 

  • I think Idea MS-I-409 requests the functionality already available in MicroStation

    I proposed that Idea because of comments by others on previous posts in this Forum.  I agree that MicroStation's built-in functionality works, as documented and as described by you.  That is, attach Items to a model in a cell library, and those Items are converted to a Items attached to the cell instance.

    The picture is blurred because of user expectations, including those expressed in this thread. What should happen when Items are attached to DGN elements in a model in a cell library (i.e. components of the cell)?

    If Bentley allows users to attach Item Types to elements, then it needs to also provide the means to access those Item Types when they are nested in a Cell

    I think that's what my Idea was attempting to say, but I phrased it inadequately.  Right now there is no mechanism to get nested Item data.  For example, how would one write an Expression?  When writing an Expression to peer inside a cell instance, this.Component[3].Item("Material") is not a valid Expression.

     
    Regards, Jon Summers
    LA Solutions

  • Hi Jon, Jan, dominic,

    I have added comments in https://microstation.ideas.aha.io/ideas/MS-I-409. Can you all please review it? 

    If you all agree to my comments, we can close that idea and start a new one for accessing items of children of cells. It will be very helpful for my team if you could provide sample drawings and some output mock-ups depicting how will you like me to expose it and how will you like to use it?

    Thanks,

    Mangesh


    This is a test

  • I have added comments in https://microstation.ideas.aha.io/ideas/MS-I-409. Is this something you are looking for? Or, am I deviating from your requirement?

    Thanks, Mangesh.  You've summarised things perfectly from my point of view.

    You've revealed the inner workings of shared and parametric cells that I had not considered.

     
    Regards, Jon Summers
    LA Solutions

  • Thanks Jan. I also tested & verified this. This was the solution I needed from the start!

    An Item Type can be attached to a cell header from a cell library by attaching the Item Type to the Model that the cell resides in. To clarify a little more, I used Microstation Explorer to access the Models in the cell library. Right clicking on the cell model allowed me to attach an Item Type to the Model. The Item Type attached to the model shifts to the cell header when the cell is placed. This just wasn't intuitive for me. The logging of Idea-I-409 suggests to me that it probably isn't for a lot of other people as well.

    Answer Verified By: Jovan Djukanovic