Create field in text node by code

Hello All,

I'd like to know if it is possible to create field in text node by code. MVBA/C#/Any MS Versions, any useful information are welcomed. Thanks a lot.

Parents
  • I'd like to know if it is possible to create field in text node by code

    As Jan wrote, the C++ MicroStationAPI for MicroStation CONNECT must be used.  Neither .NET nor VBA have an API for text fields.

    To create a text field, you must use the TextBlock API.  That API provides an abstraction of text: it has nothing to do with DGN text or text-node elements, although you can create a text element from a TextBlock.  It can be confusing: the TextBlock API manages a DOM of text and text-styles.  Write and test some code to create/edit text using that API.  Start with simple text elements and move on to text nodes and text fields once you understand the API.

    The MicroStationAPI documentation provides some advice about TextBlock, but you won't find it!  It's hidden under topic deprecated10_0.fdf File Reference.  Search for something like mdlText_extract to reveal it.

     
    Regards, Jon Summers
    LA Solutions

Reply
  • I'd like to know if it is possible to create field in text node by code

    As Jan wrote, the C++ MicroStationAPI for MicroStation CONNECT must be used.  Neither .NET nor VBA have an API for text fields.

    To create a text field, you must use the TextBlock API.  That API provides an abstraction of text: it has nothing to do with DGN text or text-node elements, although you can create a text element from a TextBlock.  It can be confusing: the TextBlock API manages a DOM of text and text-styles.  Write and test some code to create/edit text using that API.  Start with simple text elements and move on to text nodes and text fields once you understand the API.

    The MicroStationAPI documentation provides some advice about TextBlock, but you won't find it!  It's hidden under topic deprecated10_0.fdf File Reference.  Search for something like mdlText_extract to reveal it.

     
    Regards, Jon Summers
    LA Solutions

Children
No Data