Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

Hull and Outfitting

Example 5

  • Last UpdatedJan 20, 2023
  • 1 minute read

The macro ATTR shows the usage of the ATTRIBUTE statement. Note that it is possible to give the attribute number as an alias, a number or a variable.

MACRO,ATTR;

ASSIGN,LS,105.6;

ASSIGN,DS,0.2543;

ATTRIBUTE,'CHAIR'/ATTRDATA=(I2,4)

/ATTRDATA=(R1,LS)

/ATTRDATA=(R2,DS)

/ATTRDATA=(R3,35.45)

/ATTRDATA=(S2,'I2: chair no')

/ATTRDATA=(S3,'R1-R3: chair data');

ATTRIBUTE,55/ATTRDATA=(I,3)

/ATTRDATA=(R4,1.234);

ASSIGN,ATTNO,7777;

GET/STR=('Give a string: ',STR);

ATTRIBUTE,ATTNO/ATTRDATA=('S1',STR);

ENDMACRO;

The result of a stand alone execution of the macro ATTR is shown below.

RUN SB_SYSTEM:SZ006

Present Geometry Macro:

(0) Exit

(1) Print on terminal

(2) Create 2D geometry and store on DB

(3) Create 3D volume model and store on DB

(4) Create 3D volume model + picture and store on DB

Enter activity : 1

General Component Data Bank not assigned!

Give name of macro to be run: ATTR

ATTNO = 1111

I1 0

I2 4

R1 105.60000

R2 0.25430

R3 35.45000

S1

S2 I2: chair no

S3 R1-R3: chair data

ATTNO = 55

R1 0.00000

R2 0.00000

R3 0.00000

R4 1.23400

S1

S2

S3 3

Give a string:

> Just a test string !!!

ATTNO = 7777

S1 Just a test string !!!

Once more ? N

Give name of macro to be run:

TitleResults for “How to create a CRG?”Also Available in