True False with Quotes

True False with Quotes - Why does "-" return false - Сообщения

#1 Опубликовано: 03.01.2021 21:11:34
Ryan Freund

Ryan Freund

19 сообщений из 339 понравились пользователям.

Группа: User

Why does this return false (see image below)?
Is there anything I can do to correctly evaluate this?

Quotes are false.jpg




#2 Опубликовано: 03.01.2021 21:26:47
Ryan Freund

Ryan Freund

19 сообщений из 339 понравились пользователям.

Группа: User

So this is interesting, I can't replicate this if I define OD = "-"

However, the definition comes from a matrix which was input from excel. So in excel the cell value is "-" without the quotes. So SMath added the quotes. Attached is the SMath file which has a large matrix "HSS Section Properties - large matrix". These values were input from excel.
Steel Beams - HSS.sm (2 МиБ) скачан 39 раз(а).

I can post the excel file and import method if needed.
#3 Опубликовано: 04.01.2021 12:42:55
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 сообщений из 1674 понравились пользователям.

Группа: User

Wrote

Why does this return false (see image below)?
Is there anything I can do to correctly evaluate this?
...



Without the file it can be the same as gambling. My best guess is that when copying and pasting text many times SMath takes the unicode character instead of the simpler ASCII character, as in the attached file.

UnicodeIssue.sm (2 КиБ) скачан 27 раз(а).

UnicodeIssue.jpg

Conclusion: do not copy and paste quoted strings in SMath, but rather write them.

Best regards.
Alvaro.
1 пользователям понравился этот пост
Davide Carpi 04.01.2021 18:38:00
#4 Опубликовано: 05.01.2021 12:10:14
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: User

1. sanity the 'New' includes all valued cols
2. I know no way to search by "Text"
3. Those pipes are damned small, max ½"
4. search from visual to get the row index.
5. Header is missing of what is what in there
Can't help more ... Jean

Steel Beams - HSS Clean Matrix.sm (2 МиБ) скачан 36 раз(а).
#5 Опубликовано: 06.01.2021 21:00:04
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: User

Wrote

4. search from visual to get the row index.


For this kind of project, be a good musician ...
like having in mind the Pachelbel Cannon.
You can search wisely but only numerical.

Steel Beams - HSS Clean Matrix.sm (2 МиБ) скачан 37 раз(а).

#6 Опубликовано: 11.01.2021 19:19:04
Ryan Freund

Ryan Freund

19 сообщений из 339 понравились пользователям.

Группа: User

Sorry for my delayed response, thanks for the replies.
Jean - thanks for your work.
Razonar - I think you are on to something there, but maybe this happens due to the import from excel?

I've attached both the smath file and the excel file.

AISC_Shapes_Material_14.1.xlsx (775 КиБ) скачан 26 раз(а).
Steel - Section Import.sm (4 МиБ) скачан 41 раз(а).
#7 Опубликовано: 12.01.2021 11:01:07
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: User

You may have to consider make "_" in cols make them 0
and code the two first cols numerical.
Flies in the blue as pressing F9 !

SP HSS.PNG
#8 Опубликовано: 12.01.2021 15:16:42
Ryan Freund

Ryan Freund

19 сообщений из 339 понравились пользователям.

Группа: User

Hey Jean, Not sure why you are receiving that error. If both files are located in the same folder on your computer, it should work.

I'm hoping to not have to replace all the "-" with "0", but it would likely work.
#9 Опубликовано: 12.01.2021 15:50:20
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: User

Wrote

Hey Jean, Not sure why you are receiving that error. If both files are located in the same folder on your computer, it should work.

I'm hoping to not have to replace all the "-" with "0", but it would likely work


Quite right, first time over 1000 + downloaded documents that go zap !
You may try to replace "-" via a matrix scan.
Cheers ... Jean
#10 Опубликовано: 06.12.2023 02:07:12
Ryan Freund

Ryan Freund

19 сообщений из 339 понравились пользователям.

Группа: User

Note to future self when I don't update this and I have this problem again in 3 years...

1.) Expand the collapsed matrix in the SMath file.
2.) Copy the "-" from inside the matrix.
3.) Paste (replace) this into your functions.
Voila
  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений