VS:Rpstr GetValueBool: Difference between revisions
m (1 revision) |
No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 36: | Line 36: | ||
----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ||
<remark></remark> | <remark> | ||
Here is a sample for when this is used from the SDK plugin to communicate with a dialog: | |||
<code lang="cpp"> | |||
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() ); | |||
} | |||
</code> | |||
</remark> | |||
----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
Latest revision as of 03:01, 21 February 2016
.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix
Description
Get a boolean value from the VectorScript value repository.
FUNCTION Rpstr_GetValueBool(
name :STRING;
defaultValue :BOOLEAN) : BOOLEAN;
def vs.Rpstr_GetValueBool(name, defaultValue): return BOOLEAN
Parameters
name STRING The name of the value. defaultValue BOOLEAN Default value if the name does not exist in the VectorScript value repository.
Remarks
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() ); }
Version
Availability: from Vectorworks 2012
See Also
VS Functions:
VS:Rpstr_RemoveValues | VS:Rpstr_RemoveValue | VS:Rpstr_GetValueBool | VS:Rpstr_SetValueBool | VS:Rpstr_GetValueInt | VS:Rpstr_SetValueInt | VS:Rpstr_GetValueReal | VS:Rpstr_SetValueReal | VS:Rpstr_GetValueStr | VS:Rpstr_SetValueStr
[[VS:Rpstr_RemoveValues]] | [[VS:Rpstr_RemoveValue]] | [[VS:Rpstr_GetValueBool]] | [[VS:Rpstr_SetValueBool]] | [[VS:Rpstr_GetValueInt]] | [[VS:Rpstr_SetValueInt]] | [[VS:Rpstr_GetValueReal]] | [[VS:Rpstr_SetValueReal]] | [[VS:Rpstr_GetValueStr]]
| [[VS:Rpstr_SetValueStr]]