« Back to CIDOC-CRM Project

Library attribute "External coupling" is limited to 32000 characters

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Library attribute "External coupling" is limited to 32000 characters
community documentation development environment
Answer
3/27/14 11:29 AM
The library attribute "External coupling" is limited to 32000 characters. How can I implement scripts that are longer than that?

RE: Library attribute "External coupling" is limited to 32000 characters
fread setg execute on_event file
Answer
6/26/13 12:18 PM as a reply to Anonymous.
If the functionality that your are implementing involves more than 32000, we recommend that you save the implementation for each event handler (ON_EVENT) and each menu item (ITEM) in text files and use the AdoScript commands to run those scripts.

Example:

1. copy the AdoScript code in the file "event_BeforeCreateRelationInstance.asc" and save the file in the folder "C:\example"

2. change the contents of the library attribute External coupling

 1ON_EVENT "BeforeCreateRelationInstance"
 2{
 3[color=#b0b0b0]#save event parameters in GLOBAL variables[/color]
 4SETG id_fromInstID: (frominstid)
 5SETG id_toInstID: (toinstid)
 6SETG id_relationClassID: (relationclassid)
 7SETG id_modelID: (componentid)
 8
 9CC "AdoScript" FREAD file: ("C:\\example\\event_BeforeCreatingRelationInstance.asc)
10[color=#b0b0b0] # --> RESULT ecode: intValue text: strValue[/color]
11EXECUTE (text)
12}

RE: Library attribute "External coupling" is limited to 32000 characters
file include external coupling
Answer
6/26/13 12:35 PM as a reply to Anonymous.
Another solution would involve storing the whole content of the library attribute "External Coupling" (event handlers and menu item definitions) in a file and using the INCLUDE keyword for referencing the content of this file in the library attribute "External coupling":

1. copy the contents of the library attribute "External coupling" in the file "ExternalCoupling.asc" and save the file in the folder "C:\example"

2. change the contents of the library attribute External coupling as follows:

1@INCLUDE "c:\\example\\ExternalCoupling.asc"