Guest Mark Flamer Posted February 17, 2011 Share Posted February 17, 2011 It seems like I remember being able to cast a HANDLE to LONGINT at some point in the past. Now I cant seem to make this work. Is this possible? Thanks. Quote Link to comment
Guest Mark Flamer Posted February 17, 2011 Share Posted February 17, 2011 This works, Str2Num(Concat(FObject)) but no luck going the other way around. Might need another strategy. Quote Link to comment
maarten. Posted February 17, 2011 Share Posted February 17, 2011 When you have the longint value (the converted handle), loop trough all the object, convert their handles to longint and see if they match with the one you're looking for? Quote Link to comment
JBenghiat Posted February 17, 2011 Share Posted February 17, 2011 Mark, Can you describe the bigger goal that you are trying to accomplish? Unless VS has changed in the last few years, you should know that handles are assigned to objects at a script-run level, not at a document level. So the longint connected to an object on one run might be completely different on the next. The only way to really identify an object on a document level, is to give it a unique name. You can create your own UID scheme, but there is also a function in the API (I think under utilities). Does this info change your approach? HTH, Josh Quote Link to comment
Guest Mark Flamer Posted February 17, 2011 Share Posted February 17, 2011 I found a more efficent way to get the job done. I am aware of the handle and naming issues stated above. In this paticular situation I had a bizarre vision of needing to sort an array of struct by handles. Thanks for the input. 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.