Skip to main content
Werner_E
Werner_EAnswer
25-Diamond I
Aug 8, 2025 7:07 PM UTC

You are confusing a range variable (sort of implicit loop) with a vector (a collection of individual values).

Indices and "last" elements exist only for vectors. But the variables S and B you defined are ranges and in Prime 10 and above also s and b remain being ranges!

 

Are you trying to redo what someone else did in an older version of Prime? In versions of Prime up to V9 an inline evaluation as seen in your picture converted a range into a vector. In Prime 10 and above this does not work anymore.

I also don't see any need for the definition of the variables S and B or s and b.

Simply use  Q:=CreateMesh(q3D,1,3,1.2,5,21,20) to get the same result.

 

If you really need to convert the ranges S and B to vectors s and b you may use the small utility function range2vec which was posted here in the forum a couple of time. Starting with version 11 of Prime you should rather use the new built-in function "vec".

See for example Re: This value must be a vector in MPC10

 

Here in more detail:

Werner_E_1-1754687952393.png

Werner_E_2-1754688188513.png

 

Prime 10 sheet attached

 

3 replies

Werner_E
Werner_E25-Diamond IAnswer
25-Diamond I
Aug 8, 2025 7:07 PM UTC

You are confusing a range variable (sort of implicit loop) with a vector (a collection of individual values).

Indices and "last" elements exist only for vectors. But the variables S and B you defined are ranges and in Prime 10 and above also s and b remain being ranges!

 

Are you trying to redo what someone else did in an older version of Prime? In versions of Prime up to V9 an inline evaluation as seen in your picture converted a range into a vector. In Prime 10 and above this does not work anymore.

I also don't see any need for the definition of the variables S and B or s and b.

Simply use  Q:=CreateMesh(q3D,1,3,1.2,5,21,20) to get the same result.

 

If you really need to convert the ranges S and B to vectors s and b you may use the small utility function range2vec which was posted here in the forum a couple of time. Starting with version 11 of Prime you should rather use the new built-in function "vec".

See for example Re: This value must be a vector in MPC10

 

Here in more detail:

Werner_E_1-1754687952393.png

Werner_E_2-1754688188513.png

 

Prime 10 sheet attached

 

Translate
terryhendicott
21-Topaz II
Aug 8, 2025 7:10 PM UTC

It is the old range is not a vector and visa-versa issue.

si and bi are index ranges, s and b are vectors.

Capture.JPG

Translate
Community Moderator
Sep 30, 2025 9:15 PM UTC

Hi @fahmed-2,

 

I wanted to see if you got the help you needed.

If so, please mark the appropriate reply as the Accepted Solution. It will help other members who may have the same question.
Please note that industry experts also review the replies and may eventually accept one of them as solution on your behalf.
Of course, if you have more to share on your issue, please pursue the conversation. 

 

Thanks,
Anurag

Translate