Skip to content

Latest commit

 

History

History
71 lines (59 loc) · 1.79 KB

File metadata and controls

71 lines (59 loc) · 1.79 KB

Rpstr_GetValueInt

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 Type Description
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() );
}

Examples

resultN := Rpstr_GetValueInt('Example', 1);
import vs

# Get an integer value from the VectorScript value repository.
name = 'Example'
defaultValue = 1

resultN = vs.Rpstr_GetValueInt(name, defaultValue)
vs.Message('Rpstr_GetValueInt returned: ' + str(resultN))

See Also

VS Functions: Rpstr_RemoveValues | Rpstr_RemoveValue | Rpstr_GetValueBool | Rpstr_SetValueBool | Rpstr_GetValueInt | Rpstr_SetValueInt | Rpstr_GetValueReal | Rpstr_SetValueReal | Rpstr_GetValueStr | Rpstr_SetValueStr

Version

Availability: from Vectorworks 2012

Category