Difference between revisions of "Splicing Commands"

(Added link to Table Splicing)
m
Line 1: Line 1:
 
(new to 4.0)  Available as in build 4.0.0.32 or later.
 
(new to 4.0)  Available as in build 4.0.0.32 or later.
  
If an index is changed external to the Analytica User Interface -- such as if it is modified as an expression, if its index values are computed, or if it is updated from ADE, Table definitions using that index may need to be re-written.  This process is called ''splicing''.  Splicing does not always occur immediately -- Analytica is likely to wait until the table definition is required before initiating the splice operation.   
+
If an index changes for a reason other than the user changing via the Analytica User Interface -- such as if it is computed from other variables that change, or it is updated via the API in ADE -- it may affect Edit Tables that use that index.  This process is called ''splicing''.  Usually Analytica waits until the table definition is needed before performing the splice, rather than doing it immediately an index changes.   
  
Normally, the fact that definitions are being spliced, and when they are being spliced, is transparent to you as a user of AnalyticaHowever, occassionally there are reasons you might want to force the splice to occur. If you about to save a model, and you want to minimize load time and evaluation time for users or ADE applications that use the model, then you might want to force splicing to occur before saving, so this cost won't have to be paid by people using the model later. A second concern is that there is a possibility that evaluation errors might occur when Analytica performs the splice (since some indexes and their predecessors might need to be recomputed, for example). When you initiate the splice explicitly, you can control when the errors occur.
+
Normally, the Analytica user won't notice, or need to know, when the splice happensOccasionally, you may want to force the splice: One reason is when you want to save a model, and want to incur the splice effort before saving rather than on loading the model, which may add to load and evaluation time. Another is to check for possible errors caused by the splice immediately. By forcing the splice, you will see any such errors. The commands SpliceIndex and SpliceTable give you ways to do that from the Typescript or a Button Script.
  
 
= SpliceIndex all =
 
= SpliceIndex all =
Line 10: Line 10:
 
  SpliceTable all
 
  SpliceTable all
  
= SpliceTable ident =
+
= SpliceTable var=
  
Splices the table definition of ''ident'' to reflect the current values of all its table indexes. All indexes of ident are spliced, and all child tables of those indexes are spliced.
+
Splices the table definition of ''var'' to reflect the current values of all its indexes. It splices all indexes of var, and all other tables that use those indexes.
  
= SpliceIndex ident =
+
= SpliceIndex i=
  
Forces the index identified by ''indent'' to be spliced.  All child table definitions are updated, although each child table might not be fully updated, since each table might contain other unspliced indexes.
+
Forces index ''i'' to be spliced.  It updates all child table definitions, although not necessarily each child table, since it might contain other unspliced indexes.
  
 
= See Also =
 
= See Also =
  
 
* [[Table Splicing]]
 
* [[Table Splicing]]

Revision as of 23:36, 20 September 2007

(new to 4.0) Available as in build 4.0.0.32 or later.

If an index changes for a reason other than the user changing via the Analytica User Interface -- such as if it is computed from other variables that change, or it is updated via the API in ADE -- it may affect Edit Tables that use that index. This process is called splicing. Usually Analytica waits until the table definition is needed before performing the splice, rather than doing it immediately an index changes.

Normally, the Analytica user won't notice, or need to know, when the splice happens. Occasionally, you may want to force the splice: One reason is when you want to save a model, and want to incur the splice effort before saving rather than on loading the model, which may add to load and evaluation time. Another is to check for possible errors caused by the splice immediately. By forcing the splice, you will see any such errors. The commands SpliceIndex and SpliceTable give you ways to do that from the Typescript or a Button Script.

SpliceIndex all

Forces all unspliced indexes and tables to be updated. This is equivalent to:

SpliceTable all

SpliceTable var

Splices the table definition of var to reflect the current values of all its indexes. It splices all indexes of var, and all other tables that use those indexes.

SpliceIndex i

Forces index i to be spliced. It updates all child table definitions, although not necessarily each child table, since it might contain other unspliced indexes.

See Also

Comments


You are not allowed to post comments.