[CONNECT] Place Normal Cell Instance from Library

The MicroStationAPI and the DgnPlatformNet have a CreateSharedCellElement() method (as of Update 10).  It creates an instance, or placement, of a shared cell element in a DGN model.

Why isn't there a C++ .NET similar method for creating instances of normal cells?  Consider these existing methods:

  • VBA:  CreateCellElement2 
  • MicroStationAPI: mdlCell_getElmDscr  
Parents Reply
  • Hi ,

    DgnPlatform provides a CreateCellElement method (signature below) that can be used to create a normal cell.

    static DGNPLATFORM_EXPORT void CreateCellElement  ( EditElementHandleR  eeh,  
      WCharCP  cellName,  
      DPoint3dCR  origin,  
      RotMatrixCR  rMatrix,  
      bool  is3d,  
      DgnModelRefR  modelRef  
     ) 

    There are two (parametric) cell creation examples located in the Contraints\constraint2ddemo example here:

    Constraints\constraint2ddemo\constraint2ddemo.cpp:1082:static void exampleFunctionalCell ()
    Constraints\constraint2ddemo\constraint2ddemo.cpp:1158:static void exampleFunctionalCellFromDgn ()

    I will see if we can provide a code snip for creating a simple cell element around this and post here.

    HTH,
    Bob

    UPDATE: I see your mention to be able to place existing from Cell library as normal.  I will look into that aspect more. For now, the approach used (not ideal) in CellExplorer is to set the active parameter Cell Name, then execute the place cell command. This should be consistent w/product behavior and using native code, though not the public API code desired, nor a simple call (yet) I can provide.

    FILE: Elements\CellExplorer\cellexp.cpp:896:                        ActiveParams::SetValue (pWString, ACTIVEPARAM_CELLNAME);
    
    SNIP:
    ...
    ActiveParams::SetValue (pWString, ACTIVEPARAM_CELLNAME);
    ...
    mdlDialog_cmdNumberQueue (false,CMD_PLACE_CELL_ICON,L"",MSInputQueuePos::INPUTQ_EOQ);



Children