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

Re: Micorstation select series 2 V8i c#/VBA

$
0
0

Like Jan, I think a Dictionary<> will be the most effective construct. It's up to your choice, if you build 2 of them or  build a single one, where you store the information of both the line and the text element (use mslink for the key). The comparison effort is nearly the same except you expect to have a large number of elements where only the line or the text exists. Insertion and search in a dictionary is very fast (approx. log2(n)). In the end you have to decide if you search for EACH existing element in the first dictionary against a second dictionary, or if you check ALL elements inside you single dictionary to have both (line+text) information set.

A Hashlist is similar (in fact the keys of dictionary are stored as hashes) in C# you have a HashSet, where the difference is that you do not have a separate key and the hash is build over the whole information. So you cannot 'enhance' information later, as you might with a dictionary, where key and content are divided.

HTH Michael


Viewing all articles
Browse latest Browse all 1677

Trending Articles



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