VS:GetPrimaryUnitInfo/ja

From Vectorworks Developer
Jump to: navigation, search

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


Description

現在設定されている主単位の情報を返します。
PROCEDURE GetPrimaryUnitInfo(
VAR style  :INTEGER;
VAR prec  :LONGINT;
VAR dimPrec  :LONGINT;
VAR format  :INTEGER;
VAR angPrec  :INTEGER;
VAR showMark  :BOOLEAN;
VAR dispFrac  :BOOLEAN);
def vs.GetPrimaryUnitInfo():
    return (style, prec, dimPrec, format, angPrec, showMark, dispFrac)

Parameters

style INTEGER 単位の種類
prec LONGINT 表示精度
dimPrec LONGINT 寸法線の精度
format INTEGER 小数表記の種類
angPrec INTEGER 角度精度
showMark BOOLEAN 単位表示
dispFrac BOOLEAN 分数表示

Example

PROCEDURE Example;
VAR
	style              :INTEGER;
	prec, dimPrec      :LONGINT;
	format, angPrec    :INTEGER;
	showMark, dispFrac :BOOLEAN;
	major, minor, maintenance, platform :INTEGER;
BEGIN
	GetVersion(major, minor, maintenance, platform);
	GetPrimaryUnitInfo(style, prec, dimPrec, format, angPrec, showMark, dispFrac);

	CASE major OF
		8: CASE style OF
			0: AlrtDialog('Custom');
			1: AlrtDialog('Old Style Feet/Inches');
			2: AlrtDialog('Millimeter');
			3: AlrtDialog('Centimeter');
			4: AlrtDialog('Inches');
			5: AlrtDialog('Meters');
			6: AlrtDialog('Feet/Inches');
			7: AlrtDialog('Feet');
		END;

		9..11: CASE style OF
			0: AlrtDialog('Custom');
			1: AlrtDialog('Feet/Inches');
			2: AlrtDialog('Feet');
			3: AlrtDialog('Inches');
			4: AlrtDialog('Millimeters');
			5: AlrtDialog('Centimeters');
			6: AlrtDialog('Meters');
		END;

		12: CASE style OF
			1: AlrtDialog('Feet and Inches');
			2: AlrtDialog('Inches');
			3: AlrtDialog('Feet');
			4: AlrtDialog('Yards');
			5: AlrtDialog('Miles');
			6: AlrtDialog('Microns');
			7: AlrtDialog('Millimeters');
			8: AlrtDialog('Centimeters');
			9: AlrtDialog('Meters');
			10: AlrtDialog('Kilometers');
			11: AlrtDialog('Degrees');
		END;

	END;
END; 
RUN(Example);

Version

利用可能バージョン: VectorWorks8.0

See Also

関連関数:

VS:GetRoundingBase

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

Variants
Actions
Advanced Search
See Also
Navigation
Toolbox
In other languages