Difference between revisions of "CreateNewObject"

(Created page with "category:Meta-Inference Functions ''new to Analytica 4.7'' == CreateNewObject( class, inModule'', title, identifier, original'' ) == Creates a new Analytica object...")
 
Line 1: Line 1:
 
[[category:Meta-Inference Functions]]
 
[[category:Meta-Inference Functions]]
  
''new to [[Analytica 4.7]]''
+
== CreateNewObject(class, inModule'', title, identifier, original'') ==
 +
Creates a new Analytica object in the global namespace and returns a [[handle]] to it.
  
== CreateNewObject( class, inModule'', title, identifier, original'' ) ==
+
'''Parameters''':
 
+
*«class» specifies the type of object, such as Variable, Chance, Index, Module, FormNode, etc.  
Creates a new Analytica object in the global namespace and returns a handle to it.
+
*«inModule» identifies the module where the object should be placed.
 
+
*«title» is optional title text.
«class» specifies the type of object, such as Variable, Chance, Index, Module, FormNode, etc.  
+
*«identifier» is the desired identifier. If an object with that identifier already exists, it will be made unique by adding numbers to the end. If not specified, the «title» or «class» will be used to generate an identifier.
 
+
*«original» is used when creating an Alias or FormNode, and specifies the original object.
«inModule» identifies the module where the object should be placed.
 
 
 
«Title» is optional title text.
 
 
 
«Identifier» is the desired identifier. If an object with that identifier already exists, it will be made unique by adding numbers to the end. If not specified, the «title» or «class» will be used to generate an identifier.
 
 
 
«original» is used when creating an Alias or FormNode, and specifies the original object.
 
  
 
Because the creation of a new object is a side-effect, it cannot be evaluated from a variable definition, or while a variable is being evaluated. You use it from the [[Typescript Window]] or a button's [[OnClick]] event.
 
Because the creation of a new object is a side-effect, it cannot be evaluated from a variable definition, or while a variable is being evaluated. You use it from the [[Typescript Window]] or a button's [[OnClick]] event.
  
 
== Usage ==
 
== Usage ==
 +
This function is rarely used in models. It is used in advanced situations that implement [[meta-inference]] algorithms, such as algorithms that alter a model and its structure, or which automatically construct a sub-model for a specialized computation, or create "diagrams as drawings" to depict information.
  
This function is rarely used in models. It is used in advanced situations that implement [[meta-inference]] algorithms, such as algorithms that alter a model and its structure, or which automatically construct a sub-model for a specialized computation, or create "diagrams as drawings" to depict information.
+
==History==
 +
Introduced in [[Analytica 4.7]].
  
 
== See Also ==
 
== See Also ==
 
+
* [[ShowWindow]]
* [[ShowWindow]], [[CloseWindow]]
+
* [[CloseWindow]]
 
* [[OnClick]]
 
* [[OnClick]]

Revision as of 00:14, 21 January 2016


CreateNewObject(class, inModule, title, identifier, original)

Creates a new Analytica object in the global namespace and returns a handle to it.

Parameters:

  • «class» specifies the type of object, such as Variable, Chance, Index, Module, FormNode, etc.
  • «inModule» identifies the module where the object should be placed.
  • «title» is optional title text.
  • «identifier» is the desired identifier. If an object with that identifier already exists, it will be made unique by adding numbers to the end. If not specified, the «title» or «class» will be used to generate an identifier.
  • «original» is used when creating an Alias or FormNode, and specifies the original object.

Because the creation of a new object is a side-effect, it cannot be evaluated from a variable definition, or while a variable is being evaluated. You use it from the Typescript Window or a button's OnClick event.

Usage

This function is rarely used in models. It is used in advanced situations that implement meta-inference algorithms, such as algorithms that alter a model and its structure, or which automatically construct a sub-model for a specialized computation, or create "diagrams as drawings" to depict information.

History

Introduced in Analytica 4.7.

See Also

Comments


You are not allowed to post comments.