Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Community
- Creo (Previous to May 2018)
- Creo Modeling Questions
- How to Convert a String Parameter to a Real Numbe...

Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Jun 27, 2013
03:31 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Jun 27, 2013
03:31 AM

How to Convert a String Parameter to a Real Number Parameter?

See the Attachment。

1 REPLY 1

Jun 27, 2013
03:52 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Jun 27, 2013
03:52 AM

Interesting question.

I am almost sure you cannot do that directly.

But you can do an evaluation of "A"

If there is only a fixed number of "lengths"... values for "A", you can to a inverse comparison:

If A="150"

L=150

If A="100"

L=100

If A="50"

L=50

endif

endif

else

L=1

endif

(something like that...) not positive about the syntax but you get the idea. Just remember the "else" statement in case you run into an anomaly.

...and if the variety of "lengths" is too great, you can just build the if statements using one digit at a time and sum the value as multiples. Through 999, you would only have 27 if statements; 9999 would be 36 if statements. I trust they are always whole numbers?

...if A^1= 2 then L^1=200 if A^2=9 then L^2=90 if A^3=5 then L^3=5 L=L^1+L^2+L^3

Of course, you also have to evaluate the length of A to determine the multiplier.