cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

File opening in Epic 5.1

ptc-1795223
1-Newbie

File opening in Epic 5.1

Hi All, Can anyone supply me with an example in either ACL or Java that opens a file off the local file system, and presents it to the user in Epic for editing? After studying the documentation I can get a handle on a file for processing, but I can't for the life of me display it to the user in the Epic editor. Thanks in advance Chris
2 REPLIES 2

You have a couple of options available; one is quicker, and the other provides more control. Once you have your system path saved to a variable $file = "C:\\file\\myfile.xml"; You can open it using the edit command: edit -newwindow $file; or you can go the long way, open a file handle, create a window and then show the window. It's more code but provides control over how the editor window is built (geometry, menus, scroll bars, ect.) Review the online help for each function for your bit flags #create a doc tree and get a doc ID $docid=doc_open($file,0x001|0x020); #create a win for the doc ID and get a win ID $winid=window_create("edit",16|0x00008|0x00010,$docid); #show the doc in the window doc_show($docid,$winid); #map (open) the window window_open($winid); Hope this helps; -Jason A. Buss

"Chris Parr" wrote:

Hi All, Can anyone supply me with an example in either ACL or Java that opens a file off the local file system, and presents it to the user in Epic for editing? After studying the documentation I can get a handle on a file for processing, but I can't for the life of me display it to the user in the Epic editor. Thanks in advance Chris

Many thanks for the answer. I missed the edit command whilst looking for things like file_open (or similar). Cheers C
Announcements