Quantcast
Channel: MicroStation Programming Forum - Recent Threads
Viewing all articles
Browse latest Browse all 7260

RE: [CONNECT C#] Yet another create cell question

$
0
0

Hi Krister,

[quote user="ksurell"]I know there have been a lot of discussion about the problem of placing cells from cell libraries using C# in CONNECT. [/quote]

In my opinion this issue was mostly solved in Update 4, because CreateCellElement methods become part of published API again. Is there any specific reason why to create own implementation of the same functionality?

[quote user="ksurell"]I would like to get hold of a Bentley.DgnPlatformNET.Elements.Element from the resulting element descriptor.[/quote]

I have no solid arguments, it's just my feeling, is that it will be not easy, especially when the element is not persistent (stored in a file) yet.

[quote user="ksurell"]cellElement = Element.GetFromElementRef((IntPtr)cellDscr)[/quote]

I think it cannot work from two reasons:

  • Element descriptor and ElementRef are two different structures. Even in MDL there are special functions to make this conversion.
  • ElementRef requires (as far as I know) the element is stored in a design file and cannot be used with elements existing in memory only.

[quote user="ksurell"]The following works but I would like to get an Element from the descriptor for further processing[/quote]

In my opinion there are two ways:

  • To save the element to design file as soon as possible and to read it again from managed code and do the processing.
  • To work with the element using MDL functions, to do necessary processing and save it, but without managed code.

With regards,

  Jan


Viewing all articles
Browse latest Browse all 7260

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>