Hei,
I was wondering what would be best way to check if solid is sphere in vba or vb.net ?
Thanks
Martin
I would use the GetCExpressionValue to make the call to the mdl function. To make things easier I might wrap the call in an MDL application first so that I could debug easier.
HTH,
mark anderson [Bentley]
Visit me at https://communities.bentley.com/communities/other_communities/bentley_innovation/default.aspx
Unknown said:Declaring Function mdlElmdscr_isSphere in external vb.net application does not work
It doesn't work because the MDL functions must operate in MicroStation's memory space. If you call from a separate .exe then you are operating in that application's memory space. In general, you can't use one application's API from another application.
You may be able to use the MicroStationDGN COM server (that supplies MicroStation VBA) across a process boundary. That's because Microsoft's inter-process COM marshalling takes care of the hard stuff.
Regards, Jon Summers LA Solutions
Thanks Mark,
It works fine. I get all info I need
Another question: How can I check if solid is sphere and get all info about sphere from external vb, c# or c++ application?
Declaring Function mdlElmdscr_isSphere in external vb.net application does not work as far as I now.
In VBA I would use this MDL function:
Declare Function mdlElmdscr_isSphere Lib "stdmdlbltin.dll" ( ByRef radiusP As Double , ByRef centerP As Point3d , ByRef rotMatrixP As Matrix3d , ByVal edP As Long ) As Long
You can get the element descriptor from the element object.