« Quay về CIDOC-CRM Project

Library attribute "External coupling" is limited to 32000 characters

Xem kết hợp Flat Xem Xem cây
Luồng thảo luận [ Trước | Tiếp theo ]
toggle
Library attribute "External coupling" is limited to 32000 characters
community documentation development environment
Câu trả lời
11:29 27/03/2014
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
Câu trả lời
12:18 26/06/2013 gửi bài phản hồi tới Cho phép người dùng chưa đăng ký.
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
Câu trả lời
12:35 26/06/2013 gửi bài phản hồi tới Cho phép người dùng chưa đăng ký.
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"