on 2016 Feb 04 2:03 AM
How do I call a HitTest from a DotNet project?
I'm just trying the DotNet application SDK samples such as Gestures.
I'm guessing you would call a DotNet hit-test like this...
var hitTest = new HitTestWrapper(200, 200);
var result = _dvlRenderer.HitTest(hitTest);
if (Result.OK == result)
{
....
}
...but I always get a result of Result.BadFormat, which implies to me that m_uSizeOfDVLHitTest does not hold the expected value in the underlying sDVLHitTest struct
I am using visual studio 2015, and framework 4.5 (also tried 4.5.2)
----------------------------------
I have also run into a problem executing a query. I haven't had either of these problems in WinAPI or HTLM5 examples.
var scene = renderer.AttachedScene;
var result = scene.Execute(Execute.Query, "everything() hide()");
MainWindow._instance._forceRender = true; //This is just a hack to force redraw.
This always does nothing and returns Result.NotFound.
My guess is that there is something wrong with my project rather than mistakes in the actual code. Could it be an issue with vs 2015? Or does the string need some special formatting such as the UTF8 conversion needed on the WinAPI example?
Message was edited by: Peter Dansted.. Added Query issue.
Request clarification before answering.
Hi Peter,
Yes you are correct, the constructor of HitTestWrapper object is not implemented correctly, it does not set the size appropriately. We will update the SAP.VE.DVL.Interop.dll to fix it. I am currently communicating with Michael and Igor for the distribution process of the updated version.
Regards,
Bo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bo Zhang,
Great!
Could you get them to look at that Execute.Query snippet as well?
Otherwise, do you want me to split this Execute.Query issue out into a separate post?
(The reason I put them together is that I had guessed there was probably some trivial reason messing up my project, such as needing to use vs 2012 instead of vs 2015 etc or not including correct dlls etc)
Hi Peter,
The HitTest bug will be fixed and distributed as a critical-fix build to you. I will contact Michael for this release. The Execute.Query function works as expected in my testing environment. We are indeed using VS2012 library to build the wrapper, please try using VS2012 (vc100) library instead of VS2015 (vc110) library and see if it works.
Regards,
Bo Zhang
Hi again,
I'm still having the same problem.. though it might be related to the platform toolset question. I'm a bit hazy on the concepts there though. I might need some hand holding. Alternatively could I grab an zip of your working test?
(A button to test query etc would actually be a great thing to include in those original dotnet examples, only a few lines of code.)
-- More info: --
What I did was install VS 2012 express and try to run the C# dotnet application sdk gesture example fresh from there. I inserted a few lines to test Execute Query with the string "everything() hide()". Same NOT FOUND result, and nothing hidden.
-There didn't seem to be any obvious way to set toolkit for a c# project. I found instructions for a c++ project but the relevant fields were greyed out and marked N/A for c#.
- A test C++ project created with VS 2012 Express used the v110 toolkit, and the dropdown didn't list any others.
-Looking up v100, I found several StackOverflow references claiming the only way to get access to it would be to install VS 2010.
Hi I guess you mean "does not seem to have a way"? Otherwise clue me in
(values below found by clicking on file and choosing properties)
DVL_Win32.dll
* 23-Oct-15 12:14:44 PM
* 664kb (679,936 bytes)
* File version/Product version: blank
SAP.VE.DVL.dll
* 09-Jun-14 11:24 AM
* 15.5kb (15,872 bytes)
* File version/Product version: both 8.0.100.0
SAP.VE.DVL.Interop.dll
* June 9, 2014, 11:24:34 AM
* 69.5kb (71,168 bytes)
* File version: 8.0.1.0
* Product version: 8.0.2.0
Also, I am using Windows 10 Pro. VS 2015 and 2012 as discussed.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.