Overview | Statement List | Example


指派对象属性

概要

ASATT/{obj list|ALL|PART|'name'},attribute list[,data_type]

描述

以先前定义的对象,允许你指定对象的属性。

注:GRIP强制属性标题为大写。在Unigraphics交互中只允许您创建和读取大写的属性标题。可变长度的字符串可以是大写或小写。

参数

参数

描述

obj list

现有对象其属性将被分配。如果一个PART对象标识符被包括,它必须是在列表的第一个成员。

ALL

该属性分配给部件中的给每一个对象(除了制造对象)。

PART

属性将被分配给该部件,而不是对单个对象。

'name'

一个字符串或字符串变量,它表示一个对象的名称(对象标识符),诸如参考集。

attribute list

属性列表是一个字符串列表,它是由一系列交替的标题和值的。列表必须由偶数个元素,其中的奇数元素,1,3,5,等都是标题和偶数编号的元素,2,4,6等是值。串数组的长度必须等于该列表中的最长的标题和/或值。然而,标题的最大长度为50个字符和一个值的最大长度为132个字符。标题中不能含有符号($)。

限制条件:

  • 数的范围是任何有效的Unigraphics的数量。例: "13579"

  • Real has 8 characters including ±, E sign. Example: "3.5 E 10"

  • 日期和时间的格式必须是 "MM/DD/YY HH:MM" Example: "09/30/91 04:35"

引用数据类型使您可以嵌入一个使用转换说明以下语法引用字符串表达式:

<Xm.n@exp_name> or <Xm,n@exp_name> where:

  • <> - The enclosing angle brackets identifies the conversion specifiers and expression name for the reference.

  • X indicates a reference to an expression.

  • m.n is the conversion specification for the f format used in the C language. "m" specifies the minimum field width. If necessary, it is padded on the left to make up the field width. "n" specifies the maximum number of digits after the decimal point of the expression value. You can use a comma as the decimal point character by specifying "m,n" instead of "m.n".

  • @ indicates that an expression name is to follow.

  • exp_name specifies the expression name on the left hand side of an expression.

[,data_type]

The parameter data_type has been assigned a value of the GPA &ATTYPE. Depending on the value of data_type, even numbered elements in the attribute list are converted to the appropriate data type.

注意:属性值被表示为字符串,但它们在内部转换为指定的数据类型。如果未指定数据类型,则缺省数据类型为可变长度字符串。

部分属性只能有5个(串)的DATA_TYPE;系统会忽略其他所有data_types的部件属性。

Data_Type

Explanation

1

Integer

2

Floating point

3

Date and time

4

Null

5

Variable length character

7

Reference

空属性可以得到一个值重新分配它的标题用不同的DATA_TYPE和值。例如:

STRING/ATR(2)
ATR(1)='TITLE'
ASATT/ENT,ATR,3

ATR(2)=10
ASATT/ENT,ATR1,1


Copyright ©2015 胡君NX二次开发官网(www.UGapi.com) QQ:85585969 All Rights Reserved.