Get a string value from the VectorScript value repository.
FUNCTION Rpstr_GetValueStr(
name : STRING;
defaultValue : DYNARRAY[] of CHAR): DYNARRAY[] of CHAR;def vs.Rpstr_GetValueStr(name, defaultValue):
return DYNARRAY[] of CHAR| Name | Type | Description |
|---|---|---|
| name | STRING | The name of the value. |
| defaultValue | DYNARRAY[] of CHAR | Default value if the name does not exist in the VectorScript value repository. |
Here is a sample for when this is used from the SDK plugin to communicate with a dialog:
bool CDlgXXX::CreateDialogLayout()
{
VectorWorks::Scripting::IVectorScriptEnginePtr vsEngine( VectorWorks::Scripting::IID_VectorScriptEngine );
if ( vsEngine )
{
VWVariant varParamsList( true );
vsEngine->Repository_SetValue( "XXX_VarName", varParamsList );
}
return this->CreateDialogLayoutFromRsrcAndVWR( kDialogID, DefaultPluginVWRIdentifier() );
} '', '', alrtOpts ) );
END;
END
ELSE
listSetting := Rpstr_GetValueStr( kSettingDefList, '1' );
proceed := (listSetting = '1');
Rpstr_SetValueStr( kSettingDefList, listSetting );
ENDimport vs
# Get a string value from the VectorScript value repository.
name = 'Example'
defaultValue = 'Example'
text = vs.Rpstr_GetValueStr(name, defaultValue)
vs.Message('Rpstr_GetValueStr returned: ' + str(text))VS Functions: Rpstr_RemoveValues | Rpstr_RemoveValue | Rpstr_GetValueBool | Rpstr_SetValueBool | Rpstr_GetValueInt | Rpstr_SetValueInt | Rpstr_GetValueReal | Rpstr_SetValueReal | Rpstr_GetValueStr | Rpstr_SetValueStr
Availability: from Vectorworks 2012