VS:GetCustomObjectChoice

From Vectorworks Developer
Jump to: navigation, search

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


Description

Function GetCustomObjectChoice returns a choice string of the specified plug-in object popup menu or radio group parameter. These parameters are displayed in the Object Info palette or the plug-in objects' creation dialog.

The string passed into the parameter name argument should use the parameter constant syntax, not the actual parameter name. The string should have the prefix character 'P', and should have all spaces replaced with underscore characters. For example, a parameter Jamb Depth would have a constant declared as PJAMB_DEPTH and therefore the parameter name argument to this function should be the string 'PJAMB_DEPTH'.

The choiceIndex parameter should be passed an integer between 1 and the number of choices, which can be determined by calling the NumCustomObjectChoices function.

FUNCTION GetCustomObjectChoice(
objectName  :STRING;
parameterName  :STRING;
choiceIndex  :INTEGER) : STRING;
def vs.GetCustomObjectChoice(objectName, parameterName, choiceIndex):
    return STRING

Parameters

objectName STRING Name of the plugin object.
parameterName STRING String indicating which parameter.
choiceIndex INTEGER Index of desired choice.

Return Value

Returns associated string of specified choice list item.

Remarks

Call from CustomObject scripts only. Returns a particular choice string for a popup menu or radio group parameter.

Example

VectorScript

theChoice := GetCustomObjectChoice(objectName, 'PDINNER_MENU', 1);

Python

theChoice = vs.GetCustomObjectChoice(objectName, 'PDINNER_MENU', 1)

Version

Availability: from VectorWorks8.0

See Also

VS Functions:

VS:NumCustomObjectChoices

VS Functions: [[VS:NumCustomObjectChoices]]
Personal tools
NamespacesFFFF

Variants
Actions
Advanced Search
See Also
Navigation
Toolbox