VS:GetLVis/ja: Difference between revisions

From Vectorworks Developer
Jump to navigation Jump to search
m (1 revision)
 
m (1 revision)
 
(No difference)

Latest revision as of 14:32, 12 August 2013

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

Description

ハンドルで指定したレイヤの表示状態を返します。

FUNCTION GetLVis(
h :HANDLE) : INTEGER;
def vs.GetLVis(h):
    return INTEGER

Parameters

h HANDLE レイヤのハンドル

Example

FUNCTION GetLayerVisibility(layerHandle :handle) :INTEGER;
	{Returns the effective visibility of a layer.}
BEGIN
	GetLayerVisibility := -1;
	IF layerHandle = ActLayer THEN GetLayerVisibility := 0 ELSE {Active layers are always visible.}
	IF (GetObjectVariableInt(ActLayer, 154) = 1) & (GetObjectVariableInt(layerHandle, 154) = 1) THEN BEGIN
		{If it's not the active layer, then the only way that it can be visible is if
		the active layer is a design layer, and so is layerHandle, and the combination
		of layer options and the layer's visibility will result in a visible layer.}
		IF (GetLayerOptions = 2) & (GetLVis(layerHandle) = 2) THEN GetLayerVisibility := 2 ELSE
		IF (GetLayerOptions = 2) & (GetLVis(layerHandle) = 0) THEN GetLayerVisibility := 2 ELSE
		IF (GetLayerOptions > 2) & (GetLVis(layerHandle) = 2) THEN GetLayerVisibility := 2 ELSE
		IF (GetLayerOptions > 2) & (GetLVis(layerHandle) = 0) THEN GetLayerVisibility := 0;
	END;
END;


PROCEDURE Example;
BEGIN
	Message(GetLVis(GetLayerByName('Layer-1')));
END;
RUN(Example);

Version

利用可能バージョン: MiniCAD