StudyAdd |
Top Previous Next |
SOAP StudyAdd( aHandle, aUserGroupName, aUserName, aProjectName, &aName, aDescription, aObjType, aTemplate, aParameters, aFilterTemplate, aUseExisting, &aErrorMsg );
REST /StudyAdd?Handle=<value>&UserGroup=<value>&UserLogin=<value> &Project=<value>&Study=<value>&Description=<value>&ObjType=<value> &Template=<value>&Parameters=<value>&FilterTemplate=<value> &UseExisting=<value> returns ErrorMsg
Description: Creates a new study in the CrashMagic system under the current account and within the current project. If Name already exists, a unique name will be created and returned in the Name parameter.
aHandle The value created in the call to Login(). aUserGroupName, aUserName - required aProjectName The name of the project into which this study will be placed. &aName Is the name for the new study. This parameter may be changed by the call depending on the value of UseExisting. aDescription A text description for this study. aObjType Type of study. ( study | intersection | node | milepost | marrs | universal ) aTemplate The name of a template to base this new study on. If blank, the Default template will be used. aParameters An XML data structure containing a list of parameters to include with the study. The number and types of parameters is determined by the query used by the study. For an intersection query that requires a date range, primary and cross streets, and the reversed version of the primary and cross streets, the parameters XML string will look like this: <Parameters> <Parameter> <Name>FirstDate</Name> <ParamType>Date</ParamType> <ParamValue>10/26/2006</ParamValue> <Enabled>True</Enabled> </Parameter> <Parameter> <Name>LastDate</Name> <ParamType>Date</ParamType> <ParamValue>10/26/2007</ParamValue> <Enabled>True</Enabled> </Parameter> <Parameter> <Name>PrimaryStreet</Name> <ParamType>String</ParamType> <ParamValue>BROADWAY</ParamValue> <Enabled>True</Enabled> </Parameter> <Parameter> <Name>CrossStreet2</Name> <ParamType>String</ParamType> <ParamValue>BROADWAY</ParamValue> <Enabled>True</Enabled> </Parameter> <Parameter> <Name>CrossStreet</Name> <ParamType>String</ParamType> <ParamValue>MAIN ST</ParamValue> <Enabled>True</Enabled> </Parameter> <Parameter> <Name>PrimaryStreet2</Name> <ParamType>String</ParamType> <ParamValue>MAIN ST</ParamValue> <Enabled>True</Enabled> </Parameter> </Parameters>
aFilterTemplate The name of a filter template to be loaded into the study after it has been created. aUseExisting If aUseExisting is true and a study with the same name already exists, with the same parameters and settings, a new study will not be created, and no error will be returned. If aUseExisting is false and a study with the same name already exists, then a unique study name will be created and returned in the Name parameter. &ErrorMsg is populated only if an error occurred that prevented the function from succeeding. Otherwise, this parameter is empty.
Example: StudyAdd( lHandle, "NY@DOT", "Don", "Project1", "My first study", "A study of important things", "intersection", "Default", "", "", "", true, lErrorMsg ); Example: StudyAdd( lHandle, "NY@DOT", "Don", "Project1", lStudy, "A study of more importance", "intersection", "Favorite1", "<Parameters/>", "", "", false, lErrorMsg );
|