VS:GetCustomObjectColor/ja

From Vectorworks Developer
Jump to: navigation, search

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


Description

SetCustomObjectColorで設定され「objectHand」に設定されている色を返します。色はinTagIDに保持されます。
FUNCTION GetCustomObjectColor(
objectHand  :HANDLE;
inTagID  :INTEGER;
VAR outColorIndex  :INTEGER) : BOOLEAN;
def vs.GetCustomObjectColor(objectHand, inTagID):
    return (BOOLEAN, outColorIndex)

Parameters

objectHand HANDLE 図形のハンドル
inTagID INTEGER
outColorIndex INTEGER

Return Value

設定できた場合はTRUEを返します。

Example

PROCEDURE Example;
VAR
	objName :STRING;
	objHand, recHand, wallHand :HANDLE;
	colorIndexBefore, colorIndexAfter :INTEGER;
	boo :BOOLEAN;
BEGIN
	IF GetCustomObjectInfo(objName, objHand, recHand, wallHand) THEN BEGIN
		RGBToColorIndex(pRed, pGreen, pBlue, colorIndexBefore);
		Rect(0, 0, 1, 1);
		SetFillBack(LNewObj, colorIndexBefore);
		IF SetCustomObjectColor(objHand, 1, colorIndexBefore) THEN BEGIN
			boo := GetCustomObjectColor(objHand, 1, colorIndexAfter);
			AlrtDialog(Concat('before: ', colorIndexBefore, Chr(13), 'after: ', colorIndexAfter));
		END;
	END;
END;
RUN(Example);

Version

利用可能バージョン: VectorWorks 2008

See Also

関連関数:

VS:SetCustomObjectColor

関連関数: [[VS:SetCustomObjectColor]]
Personal tools
NamespacesFFFF

Variants
Actions
Advanced Search
See Also
Navigation
Toolbox
In other languages