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

RE: Abstract Vertices Coordinates

$
0
0

Hi John,

[quote user="John Kapopoulos"]So, the following code works fine[/quote]

Great, good to know the code is working.

[quote user="John Kapopoulos"]Could above code be faster?[/quote]

At first, please always you Syntaxhighligther tool (yellow pencil icon) when posting any (formated properly!) code and set a right language. Compare my code and your code (even not indented) how badly can your code be read. :-(

As Jon written also, VBA is not tool focused to a performance. So, from our "C/C++ native code developers' perspective", VBA is always slow. But the question itself is correct, because wrong code can be far slower then a correct one.

With all respect, your code is badly written, so I am not sure if I understand correctly all details what it should be, but if talking about performance:

  • Use Element Scan Criteria to obtain line elements only (and don't use GraphicElementCache, it's not necessary).
  • To use ReDim always mean performance penalty. Is it necessary?

Because I have no time to try to understand unclear code, may I ask what your code should do? Is it about to display all vertices af all line elements?

[quote user="John Kapopoulos"]Please give me an other small example[/quote]

Sorry, but I have not time to write examples in my free time.

As Jon wrote, read about IPrimitiveCommandsEvent object.

With regards,

  Jan


Viewing all articles
Browse latest Browse all 7260

Trending Articles



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