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

[V8i C# MDL] mdlView_setClipBoundaryElement -168 MDLERR_NOCLIPVOLUME - Help!

$
0
0

Wondering if anyone would be able to help with an issue I have setting the clip volume for a view using mdlView_setClipBoundaryElement.

Here's the implementation:

[DllImport("stdmdlbltin.dll", CallingConvention = CallingConvention.Cdecl)]
internal static extern IntPtr mdlView_setClipBoundaryElement(long viewIndex, ref long elementID);
void DoStuff(long viewIndex){
long element = 2950;
var result = PInvoke.mdlView_setClipBoundaryElement(viewIndex, ref element);
result = PInvoke.mdlView_updateSingle(viewIndex); }

The result here is -168 MDLERR_NOCLIPVOLUME

Doing the reverse yeilds the ID '2950' as expected:

[DllImport("stdmdlbltin.dll", CallingConvention = CallingConvention.Cdecl)]
internal static extern IntPtr mdlView_getClipBoundaryElement(ref long pElementId, long viewIndex);
void DoStuff(long viewIndex){
long elementId = 0;
var result = mdlView_getClipCoundaryElement(ref elementId, viewIndex); }

I'm stumped. I've tried different elements, shapes, simple solids, all of which work when setting the clip manually in Microstation and all of which return the correct element ID when using the getter above.

Thanks in advance.

Jon


Viewing all articles
Browse latest Browse all 7260

Trending Articles



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