R_Teunissen Posted March 27 Share Posted March 27 Apologies if this was discussed in another topic. Searched but could not find anything similar. Myself and other users were getting weird results when trying to use sorting in Worksheets, or trying to add up "Weight" and "Wattage" of Lighting Devices. The culprit seams to be the fact, that certain fields that come associated with Lighting Devices are "Text" type. Meaning that a worksheet isn't able to do any math with them, and the sorting order gets messed up. Unfortunately it's not possible to change the type of the field to fix this. Wondering if: A: Can this be fixed? B: For now, is there a workaround? 😄 Is there a reason for this? Attached a screenshot of the Spotlight Preferences (Parameters) and of a Viewport with Lighting Devices, that have a Data Visualization associated, based on the Circuit Number. As you can see in the Legend, the order is now alpha-numeric. Thanks in advance for your advice. Quote Link to comment
Vectorworks, Inc Employee klinzey Posted March 27 Vectorworks, Inc Employee Share Posted March 27 Weight and Wattage are not native units in Vectorworks so they have to be text fields in order to allow the device to have a unit mark. For many of the fields users do not use exclusively a number. For your example of Circuit Number, many users will circuit numbers such as C5 to designate it as circuit 5 in the C multi-cable and use the circuit name field for the distributor name etc. In a worksheet you can convert text to a number using the Value() function, however the text string can not contain a unit mark. Quote Link to comment
Pat Stanford Posted March 27 Share Posted March 27 Typo error there Kevin Value() function in the worksheet a formula of =Value('Lighting Device Record'.'Weight) [not sure I have the record and field names correct] will give you a value instead of a text string for a string that directly converts to a number. 2, 2.0, 2.123 would all convert 2 kg would not because of the non number part of the field. =Value(Left('Lighting Device Record'.'Weight, Len('Lighting Device Record'.'Weight)-3)) Would convert 2 kg to a string of 2 and then give you value that was the conversion of that string. But it will fail if someone has used a different formatting for the unit mark. 21 kg -> 21 21.0 kg -> 21.0 21.0kg -> 21 21kg -> 2 because the formula is removing the last 3 characters. So it may require some cleanup of how your data fields are formatted to make sure they are all the same. Quote Link to comment
R_Teunissen Posted March 28 Author Share Posted March 28 @klinzey, @Pat Stanford, Thank you for explaning why. I am familiar with the formulas in Worksheets to get around this problem, but that does not solve, for instance, the order in which the possibilities show up in a Data Visualization Legend. Wouldn't it make a lot more sense to enable the user to change the "type" of the parameter in the Spotlight Preferences? 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.