Jump to content
Developer Wiki and Function Reference Links ×

Retrieving dimension values from worksheet


Recommended Posts

I'm trying to get values in a script from an excisting worksheet. These cells have the format "dimension" which doesn't seem to do very much.

Anyway, my dim is set on CM, i've placed 100 in a cell and the script can get "100" als a real value out of it. Changing the dimension settings won't change anything.

creating something with the value "100" will up its geometery, while doing the same with hardcoded "100cm" will work as intended...

I can only assume, the retrieved "100" has no dimension at all, not even the current active dimension. Any suggestions ?

Edited by hippothamus
Link to comment

If you get the value from the cell, you will get exactly that, the value that is in the cell.

If you are trying to use this value (that you know is cm) someplace where VW is expecting a dimension in another unit (like a PIO that was written in inches), you will get strange results when you paste the value in.

Four possible options:

1. Make sure that where you are using the dimension is set to use dimensions rather than just straight numbers. This only works if it is all in your script.

2. Manually do the conversion in your script to the units the PIO is expecting.

3. Convert the value to a string and append the 'cm' to the end prior to using the value.

4. If you can live with the cm showing on every row in the worksheet just edit the format of the cells to include cm in the trailer and then use GetWSCellString.

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...