I think LoadScript might be what you are after:
-------------------------------------------------------------------
Using a Script to Call Another Script
You can write a script that includes code that calls and executes
another script. The following guidelines apply to this process:
- You can only call and execute a compiled script from within
another script.
- Use the LoadScript method to load the script into memory.
- Use the FreeScript to unload the script from memory.
- Even if you call LoadScript multiple times, the script is only
loaded into memory one time. However, for each LoadScript
call you make, you must include a corresponding FreeScript
call. If you do not do this, the script will not be unloaded
from memory.
-------------------------------------------------------------------
LoadScript Method (Application)
Description
This subroutine loads the source or compiled image of a script
contained in the specified file. You can specify the file without
its extension and Rational Rose will load the source script (.
ebs), if found. If not found, Rational Rose will load the compiled
script (.ebx file).
Notes:
- This subroutine is only valid for Rational Rose Script; it
does not exist in Rational Rose Automation.
- When finished with the script, you should make a call to
FreeScript. Because scripts contain reference counting information,
if you call LoadScript on a given script 10 times, you should
subsequently call FreeScript 10 times; otherwise the script
will not be unloaded.
Syntax
theApplication.LoadScript theFileName
Element Description
BasicScript passes data to external functions consistent with
that routine's prototype as defined by the Declare statement.
There is one exception to this rule: you can override ByRef parameters
using the ByVal keyword when passing individual parameters. The
following example shows a number of different ways to pass an
Integer to an external routine called Foo:
Declare Sub Foo Lib "MyLib" (ByRef i As Integer)
Sub Main
Dim i As Integer
i = 6
Foo 6 'Passes a temporary integer (value 6) by
'reference
Foo i 'Passes variable "i" by reference
Foo (i) 'Passes a temporary integer (value 6) by
'reference
Foo i + 1 'Passes temporary integer (value 7) by
'reference
Foo ByVal i 'Passes i by value
End Sub
The above example shows that the only way to override passing
a value by reference is to use the ByVal keyword.
-------------------------------------------------------------------
Example #1:
Sub Main
'
' Load external routines
'
Roseapp.LoadScript "c:\mystuff\myCompiledLib.ebx"
'
' call routines in other file
'
foo()
'
' All done, free to free memory
'
RoseApp.FreeScript "c:\mystuff\myCompiledLib"
End Sub
NOTE: "Declare" is optional for calling rose script code (not
optional if working with DLL's). You might want to
use the DECLARE statement to declare the external functions, i.e.
enforce parmeters passed to this external function.
Example #2:
Here's a rather extreme example where the external file with the
function to be called is dynamically generated.
Declare Sub Test (arg As String)
Sub Main
sourcefile$ = "c:\temp\temp.ebs"
binfile$ = "c:\temp\temp.ebx"
Open sourcefile For Output Access Write As #2
Print #2, "Sub Test (display As String)"
Print #2, " msgbox display"
Print #2, "End Sub"
Close #2
roseapp.compilescriptfile sourcefile, binfile, True
roseapp.LoadScript binfile
test "ok"
End Sub
-------------------------------------------------------------------
Patrick Kennedy
Rational Support
On Dec 15, 13:09, Ron Howard wrote:
> Subject: (ROSE) "Include files" in ebs files.
>
> Is there any way to implement #include to include common functional modules
> in my .ebs files?
>
> Thanks
>
> ************************************************************************
> * Rose Forum is a public venue for ideas and discussions.
> * For technical support, visit http://www.rational.com/support
> *
> * Admin.Subscription Requests: [EMAIL PROTECTED]
> * Archive of messages:
http://www.rational.com/products/rose/usergroups/rose_forum.jtmpl
> * Other Requests: [EMAIL PROTECTED]
> *
> * To unsubscribe from the list, please send email
> *
> * To: [EMAIL PROTECTED]
> * Subject:<BLANK>
> * Body: unsubscribe rose_forum
> *
> *************************************************************************
>
>-- End of excerpt from Ron Howard
************************************************************************
* Rose Forum is a public venue for ideas and discussions.
* For technical support, visit http://www.rational.com/support
*
* Admin.Subscription Requests: [EMAIL PROTECTED]
* Archive of messages:
http://www.rational.com/products/rose/usergroups/rose_forum.jtmpl
* Other Requests: [EMAIL PROTECTED]
*
* To unsubscribe from the list, please send email
*
* To: [EMAIL PROTECTED]
* Subject:<BLANK>
* Body: unsubscribe rose_forum
*
*************************************************************************