Retrieving an empty variable from Excel to drive notes

Hello

I have a slightly complicated question to ask about a family of rooms that drives a graduated ruler via notes entered into custom properties.
I use this function in the Excel of the part family (at the end of the equation processing): =IF(OR(ESTERROR($Y$64);$Y$64=""); ""; CTXT($Y$64; 2; FALSE))
It allows me to display or not a graduation that looks like this: 32.25.
I am not an expert and this formula was done step by step in order to get what I wanted.


For the moment I have the result I want but there is still a problem, when the equation gives a false result I ask to display an "empty" note hence the quotation marks in the equation (before the CTXT...).
But when SolidWorks retrieves void from a custom property, the result is ($Erreur) that it then goes into my note and displays it in the CAD.


What I want is for it to display nothing, my grade has no inscription so the result is empty not ($Erreur).
I don't know if I managed to make myself understood because it's not easy to explain...

Hello

I guess putting a dot or a space is not possible, try replacing "" with CAR(0), which will give:
=IF(OR(ISTERROR($Y$64);$Y$64=""); CAR(0); CTXT($Y$64; 2; FALSE))

It was a good idea, I dug it out by trying with the 160 character, the 32, etc... but nothing helps, it doesn't give the desired result.
I'm wondering if there's an option in SolidWorks for it to ignore the error of an empty custom property and just write nothing.
I searched but couldn't find this option.

Does the francization of code sting the eyes x_x

For solidworks normally no problem if the property is empty. (I have parts where this is the case and no mistake.

For Excel for information (Source: https://nebuleuse-bougies.com/comment-ecrire-cellule-vide-dans-une-formule-excel-3879):

How do I make a blank Excel cell?

If the value is zero, use a formula similar to the following to return an empty cell: = IF (A2-A3 = 0 ; â€â€; A2-A3) See the article: How to call someone?

How do you calculate empty cells? To count the number of empty cells, simply use the NB function. WHITE from Excel. More details: Empty text (= "  ") is considered an empty box (no value), although it is not actually empty.

So I guess you have to replace "" with " "

I replaced in the equation "" by "" and the result is strange.
SolidWorks keeps in memory the value it would have displayed if there were no errors and instead of displaying "nothing" or ($Erreur), the software displays a value of 32.75...
So that's not good at all ^^.

Hello

See with ISBLANK() and Null

1 Like

Looking at your formula I don't understand the point of the OR.

This formula displays the number with decimal points or an empty cell if the equation is in error:

A1=#DIV/0! (to display the error or A1=123.456789

A2=IF(TERROR(A1); " "; CTXT(A1; 2; FALSE))

And why CTXT there is the rounding function that keeps your value in numeric:

A2=IF(TERROR(A1); " "; ROUNDING(A1; 2))

To test I switched to A1  instead of $Y$64 and it seems to be functional.

At least I'm missing something (with the OR)

Sbadenis,

As I explained I am far from being an expert in Excel formulas, I make my formulas by testing so it may be that in the end the formula does not hold up in terms of cleanliness of the coding.
However, the CTXT is useful for one reason only, when I replace it with ROUNDING and the indication of the 2 decimal places SolidWorks automatically rounds the numbers ending in a 0.
We end up with a 32.9 instead of 32.90 (which I need). 
For the OR I'm starting to can't remember the "why", I just know that it was responding to another error in my formula (it's probably possible to remove it and do otherwise).
This doesn't address the issue, SolidWorks keeps showing "($ERREUR)" when it retrieves an empty custom property and shows it to me in my notes :(
 

Same problem also in a family of parts when you write a formula the " " turns into nothing and puts the note that uses property in error.

I understand the problem better now...