Jump to content


multicad.net string character check


5 replies to this topic

#1 Robse Ponte

    Member

  • Members
  • PipPip
  • 24 posts

Posted 08 January 2021 - 03:14 PM

Hello,

i have a question to a specific problem with multicad.net

What kind of language is this? C?

i have a string that works: =If(Exist(Object);Object;"")

How do I check strings? When I want to check for example the first character of the object string, how do I do this?

Can I stack if-cases like =If(Exist(Object);If((FirstcharacterofObject not #);Object;"");"")

Best regards

#2 Robse Ponte

    Member

  • Members
  • PipPip
  • 24 posts

Posted 08 January 2021 - 06:26 PM

Hello, nearly done but still far away...

If cases are stackable in Nanocad Report Table.

=Iff(Exist(Object);Iff((Object[0]!="#");Object;"");"")

but how to check the first character of the object??

#3 Kreator

    Advanced Member

  • Members
  • PipPipPip
  • 144 posts
  • LocationKrasnodar, Russia

Posted 10 January 2021 - 11:09 AM

Hi.
You should use Object's property like Object.Value or Object.Text or whatever. Object is object - not array, dictionary or any other enumerable.
To get any letter from a string use SubLeft, SubRight or SubSplit functions.
SubLeft(Object.Text; 1) will return you 1st letter.

#4 Kreator

    Advanced Member

  • Members
  • PipPipPip
  • 144 posts
  • LocationKrasnodar, Russia

Posted 10 January 2021 - 11:17 AM

About language - it seems to be something like C#, but it is not. Anyway, it is common and intuitive to use.

#5 Robse Ponte

    Member

  • Members
  • PipPip
  • 24 posts

Posted 12 January 2021 - 01:42 PM

It works perfect! Thank you very much for your help!

#6 MСAD

    Member

  • Members
  • PipPip
  • 22 posts

Posted 02 December 2021 - 03:49 PM

View PostRobse Ponte, on 08 January 2021 - 03:14 PM, said:

Can I stack if-cases like =If(Exist(Object);If((FirstcharacterofObject not #);Object;"");"")
Maybe this movie will help you

Visual representation ⚠️ of the formula in the expression builder

See more about the capabilities of nanocad

table | uMarker | mechWizard






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users