James Russell Posted February 24, 2011 Share Posted February 24, 2011 (edited) Hey all, So I'm doing a count of my new lighting positions. The light position object script is locked which means upon creation the Name filed is text. In our office we're using this to label track with a numbering system. What would be ideal is to label them 7.01, 7.02, 8.01, 9.01. All well and good. The problem comes when I want to find all the objects on the track series 7. Which in this example is 7.01, and 7.02. This I believe could be a lookup of Field Value . Light Position Obj = 7* in the database lookup dialog. The issue arrises when you have track 77 or 700 or anything else. Is there a way in the database lookup I can convert this string to a val and round it perhaps, a Round(Str2Num('Light Position Obj'.'Name')-0.499) or something of equivalent? Let me know what you think. Cheers, J Edited February 24, 2011 by James Russell Quote Link to comment
michaelk Posted February 24, 2011 Share Posted February 24, 2011 James If I'm understanding what you are trying to accomplish, it sounds like a great idea. Have you tried a Value( ) call? ie, If INT(Value ( ) )= 7..... I *think* something like that might do what you want... Can you post a lineset and piece of a database to look at? mk Quote Link to comment
James Russell Posted February 24, 2011 Author Share Posted February 24, 2011 I'll attach an example document demonstrating my issue, cheers for the comment Michael. Just having trouble making that work in the DB lookup, it won't do it for me. J Ps. I hope this works with your Light Position Objs, mines modded, let me know if you need a reversion. Quote Link to comment
michaelk Posted February 24, 2011 Share Posted February 24, 2011 James Look at column C. It returns an integer instead of text. It will take a little contemplation to figure out how to use it as a database criterion... Quote Link to comment
James Russell Posted February 24, 2011 Author Share Posted February 24, 2011 Michael, Indeed, this is a handy one to have up the sleeve but alas no victory on the database criterium. Hmmmmmmm..... J Quote Link to comment
michaelk Posted February 24, 2011 Share Posted February 24, 2011 James I suspect that a repeated application of head to wall would make that work. But perhaps we are over thinking it.... Attached are two methods that might do the trick.... hth mk Quote Link to comment
James Russell Posted February 24, 2011 Author Share Posted February 24, 2011 Michael, Have a look at the attached file and script for table generation. I originally thought a =1*, <>11*, <>111* would work but this morning a co-worker corrected me and we found that 1.*, 1 would be adequate. Check it out, I think it's pretty neat. J Quote Link to comment
michaelk Posted February 25, 2011 Share Posted February 25, 2011 Funny. I also thought of =1.* last night. The script is a very nice touch. There still may be a way of using the INT(VALUE( )) in the criteria, but my head's not up to it... mk Quote Link to comment
James Russell Posted February 25, 2011 Author Share Posted February 25, 2011 Michael, I saw your handiwork there so I can't take all the credit. Good team effort! The script's a function that I've been working on for a while; it's coming in handy. The INT(VALUE( )) I believe is going to cause us continual problems due to the fact that it's a function within a string dialogue. Cheers, J 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.