Jump to content

Data Tag: Empty as


Recommended Posts

HI there,

 

I have a Data Tag for getting out the thicknesses of wall components.

 

The code of the Data Tag look like this:

 

#WS_IF(COMPONENTTHICKNESS(1)<>0; TXT(COMPONENTTHICKNESS(1); 'Millimeters'; 'Units'); '')#
#WS_IF(COMPONENTTHICKNESS(2)<>0; TXT(COMPONENTTHICKNESS(2); 'Millimeters'; 'Units'); '')#
#WS_IF(COMPONENTTHICKNESS(3)<>0; TXT(COMPONENTTHICKNESS(3); 'Millimeters'; 'Units'); '')#
#WS_IF(COMPONENTTHICKNESS(4)<>0; TXT(COMPONENTTHICKNESS(4); 'Millimeters'; 'Units'); '')#
#WS_IF(COMPONENTTHICKNESS(5)<>0; TXT(COMPONENTTHICKNESS(5); 'Millimeters'; 'Units'); '')#
#WS_IF(COMPONENTTHICKNESS(6)<>0; TXT(COMPONENTTHICKNESS(6); 'Millimeters'; 'Units'); '')#
#WS_IF(COMPONENTTHICKNESS(7)<>0; TXT(COMPONENTTHICKNESS(7); 'Millimeters'; 'Units'); '')#
#WS_IF(COMPONENTTHICKNESS(8)<>0; TXT(COMPONENTTHICKNESS(8); 'Millimeters'; 'Units'); '')#

 

 

The problem is that the data tag displays empty rows if a wall has fewer components than 8.

Please look at the screenshot.

 

Is there a way to write an "operator" or something else (maybe with regex)

to get "EMPTY" if nothing is given out?

 

I know we have "ELSE" for: =IFS()

"ELSE" is not documented anywhere

 

Maybe a "EMPTY" or something else exists, if a nothing is given out? 

 

Could this be a useful wish, I mean "EMPTY" as new option for Data Tags?

 

Attached VW 2024 demo file

 

Greetings and many thanks for your help.

Tobi

Bildschirmfoto 2024-02-08 um 10.49.43.png

Test Data Tag.vwx

  • Like 1
Link to comment
15 minutes ago, Tobias Kern said:

The problem is that the data tag displays empty rows if a wall has fewer components than 8.

Please look at the screenshot.

 

Why is this a problem? You only know the empty rows are there whilst the tag is selected. I have several multi component tags like this

Link to comment

Untested, but put the entire function on a single line so there are no manual line breaks. The CHAR(10) in the function will add the line break. I have only included one line but you will need to use a similar code as below for each block

 

#WS_IF(COMPONENTTHICKNESS(1)<>0; CONCAT(TXT(COMPONENTTHICKNESS(1); 'Millimeters'; 'Units'),CHAR(10)); '')#

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...