VS:Rpstr GetValueStr: Difference between revisions

From Vectorworks Developer
Jump to navigation Jump to search
m (1 revision)
No edit summary
 
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:02, 21 February 2016

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

Description

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

Parameters

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