GWS Posted November 25, 2009 Share Posted November 25, 2009 I have 2 sets of screws on a worksheet. One of them is ('Screw and Nut (Metric)-3D'.'screwType_s') and the other is =('Cap Screw (Metric)-3D'.'screwType'). Is it possible to get both items into one list? In other words can I get one column to count both types? Quote Link to comment
Pat Stanford Posted November 25, 2009 Share Posted November 25, 2009 So you have two difference databases in a single worksheet? Where are you getting the Cap Screw object from? I am not seeing it in my version of VW2010. While possible to do what you want in a single database, it is going to be tricky and complicated as you will have to manually adjust the criteria and then put in fancy formulas for each cell to get the data from the correct record. Do you need to have the different type of objects interleved in the database or could you just hide the database headers and run the two databases one after the other with no spaces between them? You could then put a manual header row for both. To get the total you should be able to do a formula like =c3+d3 to get the data from the header rows of the two databases. click on rows 2 and 11 and tell us what the criteria for those databases are and it will be easier to tell you how to possibly combine them. Quote Link to comment
GWS Posted November 25, 2009 Author Share Posted November 25, 2009 (edited) I seem to have 2 tools that to similar things i.e produce metric screws one with nuts and with out. I have inadvertantly used both tools on my drawing so in some instances I get 2 lots of M4 x 0.7 (different lengths) button heads (rows 2.6 & 11.4). This does not make for an easy to read spreadsheet and would better if I could see all the M4's together. The two different objects are both metric screws. Criteria for row 2 is =('Screw and Nut (Metric)-3D'.'screwType_s') Criteria for row 11 is =('Cap Screw (Metric)-3D'.'screwType'). In the future I can change my workspace to show just one type but kust wondered if there was an immediate workaround? Many thanks Here are the 2 tools I used Edited November 25, 2009 by GWS Quote Link to comment
GWS Posted November 26, 2009 Author Share Posted November 26, 2009 I was rather hoping I could simply add 2 criteria together. =('Screw and Nut (Metric)-3D'.'screwType_s') & ('Cap Screw (Metric)-3D'.'screwType') but that just gives 'False' as an answer. Quote Link to comment
ccroft Posted November 26, 2009 Share Posted November 26, 2009 Not positive on this, but you might try another set of enclosing parenthesis for everything after the equal sign. If I have to edit the criteria directly, sometimes I'll set up a dummy database row and use the 'set criteria' button to see what the structure should look like. Quote Link to comment
Pat Stanford Posted November 27, 2009 Share Posted November 27, 2009 You can make a single database that will include the objects with both record by changing the & in the criteria above to a | (that is a vertical bar or pipe character). This then says show me the objects that have the Screw and Nut and objects that have the Cap Screw record attached. The problem is that since you have objects with two different records in the same database. If you set up a column with a formula like: =('Screw and Nut (Metric)-3D'.'screwType_s') It will only show data for the Screw and Nut objects but show nothing for the rows with Cap Screw data. In order to make the whole thing work, you will need to use an IF statement in every column to use the proper record for the field. Something like: =IF(((R IN ['Screw and Nut (ISO)-3D'])),('Screw and Nut (ISO)-3D'.'size_s'),('Cap Screw (Metric)-3D'.'screwType')) Using the above, if it is a Screw and Nut row, the cell will contain the size_s field. If it is a Cap Screw row, then it will display the screwType field. You will need to do the above for every column and change out the field names to the proper ones that match between the two records. If there aren't very many objects, you might be better off fixing the drawing to use the Screw and Nut objects rather than spend the time fighting with the worksheet. Quote Link to comment
GWS Posted November 27, 2009 Author Share Posted November 27, 2009 Thank you for your help. I do struggle with the worksheet language as I have never done any programming. I can see that using just one type of screw object is going to be the best way in the future. Many thanks 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.