I want to use the script MSMAPI_RSCall to get variable from built-in MSM script. Is somone can post an example of the call routine?
In the manual they talk about
' use of this script requires that the user script have already included the MSMAPIConstants header file.
How i do that
In the MSMAPIs.m1s the fuction look like that:
Function MSMAPI_RSCall(ByVal MSMScriptName As String, _
ByRef P1 As variant, _
ByRef P2 As variant, _
ByRef P3 As variant, _
ByRef P4 As variant, _
ByRef P5 As Variant ) As Integer
I have several question about this.
Do we need builtin function variable list to know where they variable will end in the output of MSMAPI_RSCall
When we call this function, for example, to mesure circle center
Call RunScript("ScreenSetMacros\" & GetActiveScreenSetName() & "\" & "Masters\Scripts\Common\ProbingAPI-CircleCenter")
how can i know in wich output variable of MSMAPIs i can find the circle diameter. How i can call MSMAPIs, befor RunScript, after, within?
Hi,
First thing I should say is that what you have asked about is not a simple topic.
Here are some key pieces of information to get you started:
If you are familiar with programming languages, Mach added (to the cypress basic language that it uses for scripts) a simple pre-processor ability to include common source files; this is similar to C's #include (but less sophisticated). The ability to do this is called #Expand in a mach script and this feature is documented in the mach programmer's reference manual.
Since there is no parameter passing supported by the stock RunSsript call, the MSM wrapper allows one to have a more generalized interface. The parameter passing is pretty crude and uses globals to pass parameter using an implicit convention.
Look in C:\Mach3\ScreenSetMacros\MachStdMill.set\Masters\Headers for the file: MSMAPIConstants.m1s
This is the #Expand file defines the globals used for parameter passing.
MSMAPI_RSCall is a utility that I invented for MSM. It allows you to pass parameters to a script being invoked by the mach RunScript call. RunScript is used to invoke a script that lives in a disk file. Runscript is also in the programmers manual. While is is used internally to MSM, it was not intended as a supported interface for end users to use to call MSM, rather it was intended as a tool for users to call user created scripts.
When asking about the parameters passed to MSM Probing calls, you are essentially asking about the internal structure of MSM and how it calls scripts from disk. I don't have any examples of using the MSMAPI_RSCall script already written up (it's only used internally by MSM and I use it within some MSM customizations I've done for OEM customers.
Please understand that there is not a publicly documented list of MSM internal calls because these are not publicly supported interfaces. If you choose to play with them for your personal use, you need to understand that there is no support for doing so, and the call definitions could be changed at anytime without notice. CVI does not support end user use of these interfaces into MSM. On the other hand we are not likely to change these calls (as they have been stable for several years).
If you want to see how to call an existing MSM probing routine, you can use MachScreen to look at what the button that calls the routine you are interested in is doing.
The "outputs" of MSM probing routines that you may be interested in are all present on MSM pages. Again you can use a screen editor to find the DRO values etc. MSM uses DRO, leds etc in the 1700 and 1800 ranges. See the customization section of the MSM user manual. Do not use DRO (or LEDs or user labels etc) numbers in the 1700 or 1800 range - or you may find them clobbered by a future MSM release.