VS:Rpstr GetValueInt

From Vectorworks Developer
Revision as of 03:01, 21 February 2016 by Root (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix

Description

Get an integer value from the VectorScript value repository.

FUNCTION Rpstr_GetValueInt(
name :STRING;
defaultValue :INTEGER) : INTEGER;
def vs.Rpstr_GetValueInt(name, defaultValue):
    return INTEGER

Parameters

name STRING The name of the value.
defaultValue INTEGER 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 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]]