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

RE: Get total length of multiple lines - different approach

$
0
0

[quote user="darth666"]I want to do just one scan to assign lengths values to proper line numbers [/quote]

Create a reference to Microsoft Scripting Runtime (scrun.dll) in the VBA IDE.  Now you can create a Dictionary object.

A Dictionary stores key, value pairs of information.  In your case, the key is your segment number, and value is your line length.  Scan your DGN model once to build a Dictionary of segment numbers and line lengths.

Now you can iterate your worksheet.  Each time you find a segment number, look up the corresponding line length in your Dictionary.


Viewing all articles
Browse latest Browse all 7260

Trending Articles



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