Ample script can put anyware. If you hop it can be loaded automatically when invoking the tool, just modified the startup ample.
thanks but that doesnt really answer my question.....you have to invoke the script to run it so where does it read this from? i want to put the script in a different location thatn my other files in otherwords i want to create a sandbox that i can use for testing..........how do i do this?
Which product are you referring to?
i am refereng to the mentor grapihcs. I have a bunch of scripts that are in my mentor environment. I would like to set up another directory where i can run some dummy scrtips and test them without corrupting the production environment. Where does mentor invoke it scripts from and also where can i get tutorials on AMPLEware?
If You means you wanna run some Ample codes to do test how to write Ample script, please check those install testing scripts under Mentor Tree. A;thought I have stopped to use Board Station V8.2 nearly 13 years ago, but I believe it still be there. That's a good reference to teach you how to write Ample.
I believe you are talking about AMPLE scripts which you want to load on top of the standard Mentor userware? If this is the case, you can keep his scripts in a directory and set the environment varable AMPLE_PATH pointing to the directory path. If there are multiple such paths, they need to be seperated by ":" on UNIX and MWE platforms and ";" on MKS. However, you need to make sure the file names match the corresponding AMPLE scope.
A more detailed information on the subject can be found in AMPLE user manual located at $MGC_HOME/../docs/pdfdocs/ample_user.doc in chapter 12: Userware Organization.
thank you for your assistance...but im still in the dark.....the AMPLE_PATH is it in the start up script? it is an environment variable so how do i set that up?
is this in Mentor or it is somewhere else
also the Ample user manual at MGC_HOME where do i locat that path? in the unix environment ? thank you for your feedback
Both AMPLE_PATH and MGC_HOME are environment variables.
There's another way to do this without changing the ample_path variable.
Here's what I do - not sure if it's the best way but it works great.
1. Set up a directory where all your scripts will reside. Divide them up in subdirectories by dmgr, layout, schematic, etc. Put all the scripts you have in the appropriate subdirectory.
2. Modify your startup files, like this example:
The following code in schematic.startup will create a custom menu: (you can put it before or after whatever is already there)
//this part creates the menu drop-down in the menu bar
$add_menu_item(, $menu_bar_item("CUSTOM", "custom_pulldown",,,"blue"),
//this part adds the menu items to the menu drop-down
$create_menu($window_scope_name(), @pulldown, "custom_pulldown",
$menu_default_columns, $menu_default_color,//take note of the commas after each line
$menu_special_text_item("MENU ITEM 1","function_1()",,,"helvetica-bold:12","Blue"),
$menu_special_text_item("MENU ITEM 2","function_2()",,,"helvetica-bold:12","Blue"),
$menu_separator_item());//take note of the final ) at the end, followed by the semicolon
// this part loads your userware functions into the da_session scope
$load_userware("/your userware path/function_1.ample", "da_session", @ample);
$load_userware("/your userware path/function_2.ample", "da_session", @ample);
//function_1() etc have to match the names of the functions inside the ample
3. The only difference for other BoardStation tools is that you need to load the userware into the correct scope. The custom menu creation part is the same in all of them. Here are examples of loading userware into other scopes:
$load_userware("/your userware path/function_1.ample", "dmgr_model", @ample);
$load_userware("/your userware path/function_1.ample", "lay_area", @ample);
$load_userware("/your userware path/function_1.ample", "fab_area", @ample);
4. Load and test your scripts. The way I do this is to have one ample script for each tool called load_userware.ample. In this script, all I do is load all existing userware into the tool again. If I am working on something, I do some work, reload it, test, make changes to the script, save it, reload, test, and so on. This way you can keep the tool open and reload the scripts without shutting the tool down and restarting every time you make a change. I put the Load Userware menu pick near the top of my custom menu in each tool so that it's quick and easy to get to it.
This should get you started. If you need some example files showing more about this, send your email and I'll give you some.