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

RE: MDL function difficulties: Converting string to long

$
0
0
I presume the user function you were looking for was "UnicodeStringGet", where I was able to find the copy below that wraps StrPtr as Jan suggested.

'-----------------------------------------------------------------------+
'
' name UnicodeStringGet
'
' author BSI 10/2003
'
'-----------------------------------------------------------------------+
Function UnicodeStringGet(strValue As String) As Long
If strValue <> "" Then
UnicodeStringGet = StrPtr(strValue)
End If
End Function

If you have a need to pass pointers (longs or otherwise) between MDL/C and VBA the help topic Jan recommends is a good read first, and you can find more code snips in this sample project:

e.g. C:\ProgramData\Bentley\MicroStation CONNECT Edition\Configuration\WorkSpaces\Example\WorkSets\MetroStation\Standards\Macros\NativeCodeUtilities.mvba

HTH,
Bob

Viewing all articles
Browse latest Browse all 7260

Trending Articles



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