Jump to content

James Russell

Member
  • Posts

    394
  • Joined

  • Last visited

Everything posted by James Russell

  1. I'm currently making a worksheet generator. There is a style which has been adopted at my current workplace since vectorworks 10 or so and I'm attempting to replicate it into 2010. Fingers crossed I can sort all the quirks out. J
  2. Thanks guys, exactly the solution I needed. Cheers, James
  3. Just wondering if anyone can help me with the SetWSCellFormula command. I was trying this: Procedure Test; VAR FL :String; SN,TN :Integer; WSH :Handle; Begin SN:=1; TN:=10; WSH:=CreateWS(Concat('Test',Date(2,1)),10,5); While SN<=TN Do Begin Case SN of 1: FL:='A'; 2: FL:='B'; 3: FL:='C'; 4: FL:='D'; 5: FL:='E'; 6: FL:='F'; 7: FL:='G'; 8: FL:='H'; 9: FL:='I'; 10: FL:='J'; End; SetWSCellFormula(WSH,SN,0,SN,0,'=Database((R IN [''TestRecord'']) & ([''TestRecord''.''FieldA'']=FL))'); SN:=SN+1; End; End; Run (Test); So the loop through seems to work fine although I only know this because I get 10 error message saying invalid factor. I've been struggling a lot with the SetWSCellFormula line, it works supremely well with the =database(R IN [''testrecord'']) by itself but I think I've broken it with a lookup with a variable. Thanks in advance, especially if you read this far! James
  4. Thanks everyone for your help, obvious newbie mistake. Cheers, J
  5. Hey guys, Starting Vectorscripting and have made this so far: Procedure Test; VAR WSH :Handle; Begin WSH:=CreateWS(Concat('Test - ',Date(2,1)),10,5); SetWSCellFormula(WSH,1,0,1,0,'=DATABASE(R IN ('JAMES'))'); End; Run(Test); All going well I'm aiming to make this script make a worksheet, date it, and then change row 1 to a database lookup searching for objects with the record James. Error messages: Line #9: SetWSCellFormula(WSH,1,0,1,0,'=DATABASE(R IN ('JAMES'))'); | { Error: Identifier not declared. } | { Error: Expected ) } | { Error: Did not expect this after end of statement - missing ;? } Help please? Pretty sure it'd be simple but just not quite there! Cheers, James
  6. Just wondering if anyone has come across or can help with a script to put an incremental value into the lookup on a worksheet. I'll try and give an example: Row 1: =DATABASE(('lighting device'.'order code'='A')&(R IN ['Accessory 1'])) Row 2: =DATABASE(('lighting device'.'order code'='A')&(R IN ['Accessory 2'])) Row 3: =DATABASE(('lighting device'.'order code'='A')&(R IN ['Accessory 3'])) Row 4: =DATABASE(('lighting device'.'order code'='A')&(R IN ['Accessory 4'])) Row 5: =DATABASE(('lighting device'.'order code'='B')&(R IN ['Accessory 1'])) Row 6: =DATABASE(('lighting device'.'order code'='B')&(R IN ['Accessory 2'])) etc.. I know it's probably easy with a script and a loop and two variables that increase to a limit and reset, I just don't have the knowhow to do this. Even if anyone has seen a guide which remotely guides scripts that edits worksheet's fields it would be much appreciated. Thanks, J
  7. Anyone know how to have one label legend for one lamp from my symbol library and one for another from insertion? I can change their label legend respectively after insertion but I want to know if there is an internal symbol default. J
  8. Is this possible? I want to add a gobo preview to my worksheet. Cheers. J
  9. In 2009 I was able to edit the fields of the lighting device plugin and modify the user fields to contain the additional data that I wanted my lights to have. I used to do this through the Vector-Script Plugin Editor. In 2010 it is exactly the same although after editing a parameter field and clicking ok on the main dialog box the changed settings are set straight back to their defaults, nothing happens. Anyone got any ideas?
  10. Is it possible to create section views from one object in each of the different planes? I want to create a Section Viewport slicing my object in half through its middle point in all three axis but when I turn to a front or a side view to do the middle slice facing down I am not allowed to place my section marker. Suggestions? J
  11. I need some help on a new template document I'm working on at the moment and have hit a rather big problem that I don't yet have a solution to. I have created a custom symbol which our company intend to use as a generic fixture which is inserted using the Insert Instrument Tool from spotlight. I have edited the Plugin for this to add many fields covering cost, supplier, lamp type, etc. Each of these fittings then has some records attached, whenever an accessory is added to these fittings be it a gobo, filter, snoot, lens unit, anything, it is added in an accessory record. These are quite simply labeled Accessory 1, 2, 3, 4. When the document is started these are established so there is no overlap or confusion when the worksheets are tallied. I have found this method to be more efficient when adding accessories to devices due to the ability to select multiples and add the record instead of tedious dealings with the Add Accessory Tool. Now for the hard part! Each of the lamps have a field which must be filled in the form of a letter and a number, the letter relates to the general lamp type and the number is a subcategory denoted by the key. Eg; 'A' might represent a beamshaper, within the beamshaper there are several types of mounting variations, '1' track mounting, '2' hook clamp mounting. So a beam shaper with track mounting is 'A1'. This beamshaper might have multiple accessories too and they are also given the ID of the lamp followed by the accessory number in the form 'A1.1' or 'B2.3' or whatever. The issue I have come upon is when I go to tally all the units in my worksheet up I am finding it very hard to create one very presentable document. It is easy enough to do multiple record lookups, first all the lamps, then all with Accessory 1 records, then Accessory 2 record, but then how can I summarize all these together to get a format that lists like this: ID# Instrument Type A1 Beamshaper Track Mount A1.1 Gobo Clouds A1.2 Lens Unit Type B A2 Beamshaper Hook Clamp Mount A2.2 Lens Unit Type B B2 Barellspot Hook Clamp Mount B3 Barellspot Ceiling Mount I thought that I could do data merging of multiple fields using the Concat but this only works for values not entire lookup fields. The accessories only have to display information for fields with generic names, ID#, Instrument Type, Unit Cost, Unit Supplier, etc. Hit a bit of a brick wall there, or maybe what I'm asking is in fact just impossible at this time and I should just be exporting to excel instead? Any help is great, J
  12. It was intended in a Worksheet. Most of the lamps I am using in plans are categorized by a key along the lines of A1, C4, Z9, etc. I want to break this data apart and use only the first character or only the last, inputing the value or letter into another column for summarizing, counting or creating a custom lamp key from. I'll have a look at the vectorscript though in the mean time, thankyou. J
  13. I know we can use the concat function to join fields together but is there the possibility of the reverse. I want to reference the first one or two characters of a field, ie "A1 - Shaper", pending on the application required. Anyone? J
  14. If you have a copy of VW 2008 or later you might be able to use the model box feature to create a model box of each of your buildings and use this in your overall plan. Just another suggestion. J
  15. Thanks Pat, it's always just one little sucker who has to be in the wrong place. Cheers.
  16. I was attempting to make a cutting list by doing a lookup on my extrusions with Type is extrude. All is well and good and I can output the values for =height =width and depth by another formula mentioned in the forum, =volume/(height*width), which works effectively. I am now attempting something much more intense and I hope someone can tell me why it will not work. I want to return the highest value from the height, width or depth as a stand alone formula. What I have come up with is this: =IF(WIDTH>HEIGHT, WIDTH, IF(HEIGHT>VOLUME/(WIDTH*HEIGHT)), HEIGHT, VOLUME/(WIDTH*HEIGHT)) The first if statement alone works fine if it is =IF(WIDTH>HEIGHT, WIDTH, HEIGHT) but as soon as the second IF statement is added it will not work, is it something to do with my syntax or can two ifs not be used? Cheers, James
  17. Anyone know of a plug-in that will allow me to choose some objects with records attached, select a record and field within the record and then make it autonumber from a direction? Much like the auto unit number with spotlight except for a field on a record. Cheers, J
  18. Alright guys and girls, I am attempting to divide a cell which value consists always of one letter and one number in the style A1 or H4 or M7 etc, etc. From this I wish to place the letter component in one worksheet column and the number in another. So far the best i have is this: =ROUND((INT(A1)-37827000)/65536) Where A1 is the database lookup which sources the record field containing the strange number/letter combo. At the moment this produces a series of numbers 0, 1, 2 for A, B, and C respectively. This method has several flaws, most commonly being that everytime a new value appears in the A1 column the =int() values shift ever so slightly. Also the fact that I have no way of converting the number which I am left with back to the character reference, ie. 0=A 1=B 2=C. Can anyone improve this or find a far better and cleaner solution? Thanks, J
  19. Thank you guys, it was numeric but upon checking I found that the default value was nothing instead of 0, the moment I changed this it totaled perfectly. Cheers, J
  20. I have tried B1 and many variables of it, the data base headers are not totalling the contence of the column only counting the units within. This is the latest attempt, 28 lamps, as you can see the headers are =('lighting device'.'fixture ID') showing the letter reference for the lamp type and B shows =('lighting device'.'fixture cost'). Both A1 and B1 only show the count of the number of fields below, not the added total of. Am I doing something wrong?
  21. I would like to add all the values in a database lookup in my worksheet. Field A1 is doing =('Lighting Device'.'Fixture ID') and B1 is =('Lighting Device'.'Fixture Cost'), where Fixture ID is a name and Fixture cost is the cost. 10 lamps are listed with various costs within A1.1 and A1.10 and B1.1 and B1.10 respectively. How can I in B2 add all the cost field to give a total cost. I would have thought =sum(B1.1:B1.10) would work but the past searching of previous answers would suggest no. Any help? J
  22. So you'll to draw a NURBS curve representing the path of the FOH bar, then a circle the diameter of the bar and use the extrude along a path tool. Then you should be able to make a symbol from this and use it with the insert lighting position tool. Yeah? J
  23. When you place an accessory it automatically does the position and unit number, I just need to make it do that for more fields. The question is how? J
×
×
  • Create New...