the frog Posted July 6 Share Posted July 6 Framed Artwork 1.0.0 This new post about a problem that occurs when using the Frame artwork Object. As Magnus Mikaelsen reported the string to float conversion is not working. This is a problem between US and European versions. The “float” node works only with “.” for decimals. Therefore, as in Europe the decimal separator is “,” When extracting values from the data base it doesn’t get the signification of the sign, and returns “unknow value”. In VW, data bases in Europe cannot be expressed with “.”, so there is no way to use a Marionette object or network that involves the float node. To test I changed the network, adding the “Replace String” node and the network works. Of course this is just for testing because otherwise you have to manually change the strings each time you encounter a float. No idea how in the States you could manage to make this works in Europe 1 Quote Link to comment
Letti R Posted Sunday at 05:49 PM Share Posted Sunday at 05:49 PM Hello, preparing data that is stored as a string for conversion is just a normal thing that you have to deal with when writing code (or like in this example making a Marionette). And as you already pointed out you can use the "Replace String" node to do that. There should be basically no difference between using the "Replace string" node to replace "," with "." and a modified "float" node that does the same thing but with a line of Python code inside the "float" node. As long as your data is consictent (in this case this means that every "," in your data is a decimal delimiter), you should always be able to convert it to whatever format the "float" node needs to be able to convert it into a float with some Marionette nodes. Here is an example of how i would do it with Marionette, but i think you already figured that our by yoursef. By the way, if you need to use this alot, you can combine these few nodes into a Wrapper. The Wrapper looks like a single node and also can be used as such. Here is an example of said Wrapper, how to set it up and how to use it. Regards, Letti 2 Quote Link to comment
the frog Posted Tuesday at 06:32 AM Author Share Posted Tuesday at 06:32 AM You are right this could be a way to do it. This adds time to the object final calculation. You then have to convert the differences between frame size and artwork size in feet, to centimeters (or else) in the resource manager, not converted when you change the type of units in the preferences. This is why there should be a way of modifying the way VW handles the decimals separator (like excel where you can choose). The same with the data in the OIP. This becomes a main concern when importing or using objects connected to data bases. 1 Quote Link to comment
Pat Stanford Posted Tuesday at 05:12 PM Share Posted Tuesday at 05:12 PM I believe that VW is kind of decimal separator aware, but not to the extent you want. VW uses the operating system settings to determine the "proper" settings for the decimal point and thousands separator. (period and comma in the US, command and period in the EU). If you open a file created in the US on a machine set to EU decimal settings anything stored as a number should automatically work. Anything stored as a string will potentially require manipulation. The other place this shows up is for function separator characters in worksheets (and probably scripts, I can't remember). In the US the comma is used as the separator between fields in worksheet functions. In the EU (shorthand for most of the rest of the world) since the comma is the decimal point the field separator becomes a semicolon. When you open the file the conversion happens automatically. But when we post sample code here on the forum it trips up the user many times. But I am not certain how VW could possibly know how to handle this automatically. 123,456.789 Depending on which system of markers you are using that number is either about 123 or about 123456. Would make a very big difference. 1 Quote Link to comment
the frog Posted Tuesday at 05:27 PM Author Share Posted Tuesday at 05:27 PM A I said previously this is very tricky specially when using home-made data bases because nothing changes in the figures. I realized that the symbol images kept their inch dimensions and applied them instead of converting them in cm. As the object library extend it becomes crucial to look for those “problematic” nodes that refer to external strings or data bases. I built an enveloppe node (Letti R advice) that makes the script works. 1 Quote Link to comment
Recommended Posts
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.