home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 June
/
PCWorld_1998-06_cd.bin
/
software
/
Programy
/
ARCADEA
/
DEMO30
/
MACROS.Z
/
TELLME.d3m
< prev
next >
Wrap
Text File
|
1997-04-15
|
1KB
|
55 lines
'reserve space for up to 50 points; change as desired
Dim x(50)
Dim y(50)
Dim z(50)
'sys(80) returns the number of objects selected; this is NOT necessarily
' the number of ENTITIES per se.
if sys(80) <1 then goto leave
message "There are ", sys(80), "objects selected"
for i = 1 to sys(80)
getselect i,j
message "Object #",i," is entity number ",j
entity j
message "Entity ",j, " is entity type ", sys(90)
if sys(90) = 32 then gosub grid
'sys(90) returns the entity type; type 32 is a grid object,
' which is composed of multiple grid lines
next i
end
grid:
message "This grid contains ", sys(99),"lines"
'sys(99) is usually the number of points, but for entity type 32 it is
' the number of grid lines in the grid
count=sys(99)
if count > 50 then count = 50
for k=1 to count
entity (j+k)
if sys(90) <> 33 then goto wrong
'entity type 33 is grid line; for this entity, sys(99) IS the
' number of points in the grid line
pcount=sys(1)
for L = 1 to pcount
Pointval x(L) y(L) z(L) L
next L
'recreate the grid line 50 units to the right, in blue
>line
{
<color 0,0,255
for L=1 to pcount
<PointXYZ [x(L)+50, y(L), z(L)]
next L
}
next k
return
wrong:
message "not a grid line"
'this is just armor plate; shouldn't ever get here.
return
leave:
message "You should select one or more items and run this program again."
end