Sorry, I'm lost regarding what you are trying to do.
Are you calling this from another module ??
It's way past my bedtime ... perhaps someone will be able to assist you over(my)night.
GMT+1 here.
Good night
I ' m actually trying to run this code from a modeless dialog in a synchronous way.
I want to be able to click on the button wait for the command to finish and then call the next line of code.
So far i have implemented various methods where i could just instantiate the class like this example.
var jig
= new HatchJig
(new Matrix3d
(),
new Plane
(200,
200,
200,
200),
new Polyline
() /*{ Color = color }*/, hat
); jig.RunHatchJig(layerName, color);
This example works fine and everything gets drawn the appropriate way.
When i try to execute the code for hatching by pickpoint this way. I get the error i posted the video about.
var hatch
= new PickPointHatch
(layerName, color
); hatch.TraceBoundaryAndHatch();
I 'm puzzled why every other method works fine this way but not this one.
After i found out that it would work if i called a command i ignored this error and tried to call a command. The problem is that i can't get it to be synchronous.
When I call the method like this Document.SendStringToExecute() the result is good. But its async (other code gets executed while the command is still running).
I 'm looking for a way to call the command either by this way
var hatch
= new PickPointHatch
(layerName, color
); hatch.TraceBoundaryAndHatch();
and to work fine.
or to call it somehow with
or
Document.SendStringToExecute()
while being synchronous.
I ' m not an native english speaker and sorry if you have a hard time understanding my problem.