Jump to content
Developer Wiki and Function Reference Links ×

Letter Sequence


Recommended Posts

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

Link to comment

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

Link to comment
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?

Link to comment
  • 3 weeks later...

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