DCarpenter Posted June 25, 2023 Share Posted June 25, 2023 I’m writing a vectorscript, and I need to label multiple objects in a grid (an LED wall to be exact), so my labels would be: A1, A2, A3…, B1, B2, B3… etc. sequencing numbers is easy, but how do I sequence letters? Is it possible to convert a letter to a number and sequence that way? Dave Quote Link to comment
Pat Stanford Posted June 26, 2023 Share Posted June 26, 2023 Easiest way I know of is to use a numeric pointer and then use an offset to convert the number to an ASCII character. Capital Letter A is ASCII Character 65 Decimal. So an Integer plus 64 will give you the ASCII code for capital letters C_H_R_(). will give you the character as a CHAR (single character string). (Remove the underscores. The forum parser would not let me post what I wanted.) Quote Link to comment
DCarpenter Posted July 1, 2023 Author Share Posted July 1, 2023 On 6/25/2023 at 8:00 PM, Pat Stanford said: The forum parser would not let me post what I wanted.) Pat, Thank you as always. I've always appreciated your help especially when I hit road blocks like this. I will look for examples of using a number pointer and use of an offset, and let you know if i have any questions. Did you get a citation from the Forum Police? Posting government Vectorworks documents or something? Quote Link to comment
Pat Stanford Posted July 2, 2023 Share Posted July 2, 2023 No citation. But it seems like the parser uses CHR for something so when I try to enter it it can't process it because I am not using the syntax it is expecting. But it works here so maybe it is ok without the parentheses. 🤷♂️ Quote Link to comment
SamIWas Posted July 20, 2023 Share Posted July 20, 2023 (edited) This is a little number/letter grid maker I threw together for a recent project. Might take a few tries for the output to make sense given the input, but I just haven't gone back in and clarified it all yet. But, yours to use for now if you want it. Insert Letter-Number Grid.vsm Edited July 20, 2023 by SamIWas RE-uploaded the file 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.