cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
Design forum

How to insert Array Values?

Anonymous
Not applicable
Hello everyone! I want to insert 10 arrays into this parameter. I have tested many ways to fail. I don't know what it does, please help me, thank you all.
1 ACCEPTED SOLUTION

Solution
Barry Kelly
Moderator
You want an adjustable array - I think they call it a dynamic array.

As far as I know you can't have the user add new values directly to the array but you can create a new parameter that controls the size of the array.
DIM x []

for n = 1 to y
	x = value
NEXT n

PARAMETERS x=x
Where 'y' is a new parameter that sets size of the array.
'value' is the actual value you want to put into the array.

In this case value will be the same for each field in the array.
Unless you vary the value for each 'n' - i.e. value = value+1
DIM x []

for n = 1 to y
	x = value
	value = value+1
NEXT n

PARAMETERS x=x
Not sure if this will help or not.

Barry.

One of the forum moderators.
Versions 6.5 to 25
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Dell Precision 3510 - i7 6820HQ @ 2.70GHz, 16GB RAM, AMD FirePro W5130M, Windows 10

View solution in original post

4 REPLIES 4

Barry Kelly
Moderator
Select the row button and then insert as many as you need.
You can then select the values for each and add a default value if needed.

Barry.

One of the forum moderators.
Versions 6.5 to 25
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Dell Precision 3510 - i7 6820HQ @ 2.70GHz, 16GB RAM, AMD FirePro W5130M, Windows 10

Anonymous
Not applicable
hi Barry Kelly !

Can I insert it in a 2D script? I want to use it to control the X coordinate but I cannot determine the number of points.

Solution
Barry Kelly
Moderator
You want an adjustable array - I think they call it a dynamic array.

As far as I know you can't have the user add new values directly to the array but you can create a new parameter that controls the size of the array.
DIM x []

for n = 1 to y
	x = value
NEXT n

PARAMETERS x=x
Where 'y' is a new parameter that sets size of the array.
'value' is the actual value you want to put into the array.

In this case value will be the same for each field in the array.
Unless you vary the value for each 'n' - i.e. value = value+1
DIM x []

for n = 1 to y
	x = value
	value = value+1
NEXT n

PARAMETERS x=x
Not sure if this will help or not.

Barry.

One of the forum moderators.
Versions 6.5 to 25
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Dell Precision 3510 - i7 6820HQ @ 2.70GHz, 16GB RAM, AMD FirePro W5130M, Windows 10

Anonymous
Not applicable
Thank you for helping me solve the problem

Didn't find the answer? Start a new discussion

Labels

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!