VS:GetImagePopupObjectItemIndex: Difference between revisions
Jump to navigation
Jump to search
m (1 revision) |
mNo edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 5: | Line 5: | ||
----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ||
<desc> | <desc> | ||
Return item index for the specified object (or zero if not found).</desc> | |||
----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ||
Line 13: | Line 13: | ||
</funcDef> | </funcDef> | ||
<funcDef lang="py"> | <funcDef lang="py"> | ||
def vs.GetImagePopupObjectItemIndex(dialogID, componentID, objectName): | def vs.GetImagePopupObjectItemIndex(dialogID: int, componentID: int, objectName: str): | ||
return | return int | ||
</funcDef> | </funcDef> | ||
</def> | </def> | ||
Line 41: | Line 41: | ||
----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ||
<return> | <return> | ||
Returns the image popup index for the specified object.</return> | Returns the 1-based image popup index for the specified object or zero if objectName could not be found.</return> | ||
----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ||
Line 52: | Line 52: | ||
<code lang="py"> | <code lang="py"> | ||
imagePopupIndex = vs.GetImagePopupObjectItemIndex(dialogID, componentID, 'Symbol-1') | imagePopupIndex = vs.GetImagePopupObjectItemIndex(dialogID, componentID, 'Symbol-1') | ||
vs.SetImagePopupSelectedItem(dialogID, componentID, imagePopupIndex) | |||
</code> | </code> | ||
</sample> | </sample> |
Latest revision as of 09:02, 16 April 2018
.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix
Description
Return item index for the specified object (or zero if not found).
FUNCTION GetImagePopupObjectItemIndex(
dialogID :LONGINT;
componentID :LONGINT;
objectName :STRING) : INTEGER;
def vs.GetImagePopupObjectItemIndex(dialogID: int, componentID: int, objectName: str): return int
Parameters
dialogID LONGINT Index to the dialog layout that contains the image popup component. componentID LONGINT Index to a specific image popup component. objectName STRING Name of object for which the image popup index should be retrieved.
Return Value
Returns the 1-based image popup index for the specified object or zero if objectName could not be found.
Example
VectorScript
imagePopupIndex := GetImagePopupObjectItemIndex(dialogID, componentID, 'Symbol-1');
Python
imagePopupIndex = vs.GetImagePopupObjectItemIndex(dialogID, componentID, 'Symbol-1') vs.SetImagePopupSelectedItem(dialogID, componentID, imagePopupIndex)
Version
Availability: from VectorWorks10.0
See Also
VS Functions:
VS:InsertImagePopupObjectItem | VS:GetNumImagePopupItems | VS:GetImagePopupObject | VS:SetImagePopupSelectedItem | VS:GetImagePopupSelectedItem | VS:RemoveImagePopupItem | VS:RemoveAllImagePopupItems
VS Functions:
[[VS:InsertImagePopupObjectItem]] | [[VS:GetNumImagePopupItems]] | [[VS:GetImagePopupObject]] | [[VS:SetImagePopupSelectedItem]] | [[VS:GetImagePopupSelectedItem]] | [[VS:RemoveImagePopupItem]]
| [[VS:RemoveAllImagePopupItems]]