Hello, I am having issue with the dynamic font size variable in my visualization project. I am using INT type variable to set the font size dynamically during runtime but i am getting error:"Invalid expression 3S.CoDeSys.VisualElem.FontSizeObject configured: Object reference not set to an instance of an object" when going to online (See enclosed picture). I already tried to set dynamically the font, font colors, text alignments and so on and those are working without any issues. Problem occures only with the font size.
Does anyone knows what might be wrong on this? I am using Twincat 3.1.4022.30 platform. Thanks in advance...
Marcel, thanks for the quick reply! I'll tried to do as you suggested BUT i can not do that. Extension "<px> or <pt>" comes from the drop down menu and i cannot get rid of it (see picture)or there something else i don't understand. Any other suggestions?</pt></px>
A:For sure. Actually it's not project. It's more likely test program. I am just trying create structure for the visualization elements which is being used in the interface editor. My goal is to create elements which can be used in the multiple instances like we are doing with the function blocks in the program side and that's why i would like to change all the element properties dynamically. All the other properties works like a charm but not the font size.
If you would like to see what i'm trying to do i can share this. However i don't know what would be best way to do this. Since i don't have Codesys do i export all of this stuff to open plc .xml format or what?
Q:Do you know which CODESYS Version TwinCat is using?
A:Sorry, i have no clue about this...
Thanks again!
Last edit: MaraP 2020-08-28
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello, I am having issue with the dynamic font size variable in my visualization project. I am using INT type variable to set the font size dynamically during runtime but i am getting error:"Invalid expression 3S.CoDeSys.VisualElem.FontSizeObject configured: Object reference not set to an instance of an object" when going to online (See enclosed picture). I already tried to set dynamically the font, font colors, text alignments and so on and those are working without any issues. Problem occures only with the font size.
Does anyone knows what might be wrong on this? I am using Twincat 3.1.4022.30 platform. Thanks in advance...
more posts ...
Hey,
Just remove the <px> at the end. Only add the variable to the field.</px>
Best regards,
Marcel
Marcel, thanks for the quick reply! I'll tried to do as you suggested BUT i can not do that. Extension "<px> or <pt>" comes from the drop down menu and i cannot get rid of it (see picture)or there something else i don't understand. Any other suggestions?</pt></px>
Last edit: MaraP 2020-08-27
Hey,
my bad. I did not remember this field...
Could you attach your project?
Was not able to reproduce this with SP16 Patch 1.
Do you know which CODESYS Version TwinCat is using?
Best regards,
Marcel
Q:Could you attach your project?
A:For sure. Actually it's not project. It's more likely test program. I am just trying create structure for the visualization elements which is being used in the interface editor. My goal is to create elements which can be used in the multiple instances like we are doing with the function blocks in the program side and that's why i would like to change all the element properties dynamically. All the other properties works like a charm but not the font size.
If you would like to see what i'm trying to do i can share this. However i don't know what would be best way to do this. Since i don't have Codesys do i export all of this stuff to open plc .xml format or what?
Q:Do you know which CODESYS Version TwinCat is using?
A:Sorry, i have no clue about this...
Thanks again!
Last edit: MaraP 2020-08-28
Q:Could you attach your project?
A: Just create a project archive with the test project (used in the screenshot) and all the referenced libs you are using
Project attached. I hope you get it to run...
I really appreciate your interest to this issue. Thanks!
Hey,
Sorry I was not able to reproduce the issue with the latest CODESYS Version after converting the TwinCat project to a codesys project.
So an update by twincat should help.
Best regards,
Marcel
Okay thanks. I'll try it later.