EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: Macro for workspace directory?
From: "Chen, Xihui" <[email protected]>
To: Ralph Lange <[email protected]>, EPICS Tech Talk <[email protected]>
Date: Tue, 20 Mar 2012 11:06:44 -0400
Hi Ralph,

$(user.home) is a java system property, so you can also use other system property such as $(user.dir), but there is no default system property for workspace. I think you can add such a system property from BOY script:

	importPackage(Packages.org.csstudio.opibuilder.scriptUtil);
	importPackage(Packages.java.lang);
	var s = FileUtil.workspacePathToSysPath("/BOY Examples"); // replace "/BOY Examples" to your relative path in workspace.
	System.setProperty("user.workspace", s);

You can attach this script to the display file and trigger it with a constant PV such as 0 so it can be executed once the display starts up. Then you can use $(user.workspace) as command directory.

Hope it works for you,
Xihui



> -----Original Message-----
> From: Ralph Lange [mailto:[email protected]]
> Sent: Tuesday, March 20, 2012 7:02 AM
> To: EPICS Tech Talk
> Subject: BOY: Macro for workspace directory?
> 
> Dear BOY experts,
> 
> I am trying to use the "Execute command" action.
> Inside the "Command Directory" property - how do I specify the workspace
> of the current CSS instance? (The command I am executing needs a file
> from inside the workspace.)
> I found "$(user.home)" in the examples, but the "/..." notation that is
> widely used for relative-to-workspace specifications does not seem to
> work here.
> I am sharing things between workspaces even across machines, so absolute
> addressing does not work at all.
> 
> Thanks a lot,
> ~Ralph
> 



References:
BOY: Macro for workspace directory? Ralph Lange

Navigate by Date:
Prev: RE: ARM - EPICS performance evaluation Hill, Jeffrey O
Next: Re: "Size of symbol changed" warnings building EPICS Base 3.14.12.2 Dirk Zimoch
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: BOY: Macro for workspace directory? Kasemir, Kay
Next: 32-bit TIFFs and PIL Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 18 Nov 2013 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·