Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Find an item's ID

Not entirely sure this is the most appropriate place to post but, I need to find the _id of an item I have selected as GM. It is a polygon drawing if that matters. I need to ID to set a name for use in a script. I saw a video of someone doing this but it looks like he/she used a command prompt and the chat interface was cut off in the video. Could someone tell me the easiest way to do this?
1388538387
Lithl
Pro
Sheet Author
API Scripter
The selected property of the message object contains an array of selected objects when the API command was sent. Each element of the array will have the type and ID of the selected Roll20 object, which you can then use with the getObj function to get a reference to the correct object.
Perhaps I wasn't clear what I meant, not in the API. Or perhaps I am not understanding what you are saying (I am very new to Roll20, I only heard of it 5 days ago) The video I am referencing is here <a href="https://vimeo.com/76493597" rel="nofollow">https://vimeo.com/76493597</a> at the 2:55 mark he selects a line drawn with the drawing tools (to show an example for selecting a dynamic lighting line), his mouse then goes off screen (I am assuming to the chat interface) then returns and he pastes the ID of the selected line in to the name of another object. I can find the id in a script, I would love to know how he did it there.
@{selected|token_id}
Thank you thank you thank you. This is exactly what I needed.