At the moment I do have ActiveX-VLISP code running through a while loop until the random-based loop's condition (e. g. all point distances in a 100-200-range) is met. The lsp is then loaded into the current dwg-file where the loop is executed "live" and the resulting geometry generated. But this method turned out to be far too slow.
I thought a workaround might be:
- create an instance of an AxDbDocument
- write code for geometry creation and looping within that instance
- looping codition is met, result (e.g. 100 random lines) is generated
- at the end the final geometry is copied to AutoCAD's current dwg-file (vla-get-ActiveDocument acadObj)
In the end the lsp-file will have to be loaded into the open dwg-file, which will trigger the loop. But this will only speed up the loop if the latter is run through inside the "isolated" AxDbDocument without contact to AutoCAD. Only at the end of the loop the result will be handed over to AutoCAD.
This "solution" feels like a "wrapped and isolated" loop, where isolation is only ended when the conditional statement is met. Could this basic idea possibly work? Or is it wishful thinking...