to call a macro within a macro is a nogo in Mach3, i think it is written somewhere in the documantation.
a good alternative is to us the #expand instruction of cypress.
for example create a file mylibary.m1s in your macro Folder, put some code (Sub's or function's) in:
Public Sub DoThis()
MsgBox "Sub DoThis was called"
End Sub
Public Sub DoThat(ByVal X as Long,ByVal Y as Long)
MsgBox "Sub DoThat was called with parameter X: " + CStr(X) +" parameter Y. " + CStr(Y)
End Sub
Public Function DoThiswithreturn (ByVal X As Integer) As Boolean
If X > 100 Then
DoThiswithreturn = true
Else
DoThiswithreturn = false
End If
End Function
put at the end of your macro witch whants to use this routines this:
#Expand <\..\..\macros\Mach3Mill\mylibary>
sample for macro would be:
Sub Main
Dim RetValue As Boolean
DoThis
DoThat 1,2
RetValue = DoThiswithreturn(50)
MsgBox RetValue
RetValue = DoThiswithreturn(150)
MsgBox RetValue
End Sub
#Expand <\..\..\macros\Mach3Mill\mylibary>
you can use this exand in all macros witch whant to use the same routines.