Make cell invisible in a cell library

Hi, There,

I need to hide some cells in a cell lib. I am just wondering if it is possible to achieve.

Any suggestion will be greatly appreicated.

Ken

Parents
  • A Cell is a Model; a Model is a Cell

    Unknown said:
    I need to hide some cells in a cell lib

    A MicroStation cell library is a DGN file. A DGN file is a container for one or more models. A cell library is a container for one or more cells, which by convention has file extension .cel.

    MDL Model API

    If you're writing MDL code, then the mdlModelRef_api works with models of various types. You can distinguish between model types using mdlModelRef_getModelType which tells you if a model is intended to be used as one of MODEL_TYPE_Normal, MODEL_TYPE_Sheeet or MODEL_TYPE_Extraction. Any model may be placed as a cell.

    You may not want a model in a DGN file or cell library to be displayed as a cell in the user interface. You can switch that property using mdlModelRef_setModelFlag with one of the MODELFLAG_XXX properties.

    Use mdlModelRef_setModelFlag (modelRef, MODELFLAG_NOT_IN_CELL_LIST, TRUE) to prevent a model from being included in a cell list.

    Regards, Jon Summers
    LA Solutions

     
    Regards, Jon Summers
    LA Solutions

  • I'm curious. Why would someone what to do it via programming rather than just moving the cell(s) to a library not in production.

  • Why not simply setting this in the model dialog of the library ? I currently could not think of of a way to define which cell to 'hide' that is easier than a single click. Moving it away is only second best in my eyes because you get a secon library of 'unused' parts of a specific kind, which are useable if someone (by mistake) will 'find' this library and attach it. Setting a single checkbox is just as easy and as reversible as it could be.  

    Nevertheless there is almost any reason for doing things by programming. So the question might sound curious for us, but could become meaningful, if we know the background. In example he may want to hide any cell that is created by the program - it might have the same name with a suffix and another symbology, might be a flattened 3D, or something like this.



  • Unknown said:
    Why would someone what to do it via programming

    Because it's there.  MDL programmers eat nails for breakfast  8-)

     
    Regards, Jon Summers
    LA Solutions

  • Mr Stark's hit the nail on the head.....for breakfast even !!!

  • Hi, Michael,

    I am glad my posting generated some interests. As you said, there is always some reason for doing something. It would be very easy to use the model dialog to set the property. However, if you need to change many models, it would be very time consuming.

    Best Regards,

    Ken

Reply Children
No Data