Jump to content

Pat Stanford

Moderator
  • Posts

    12,642
  • Joined

  • Last visited

Posts posted by Pat Stanford

  1. Assuming everything is actually 3D or Working Plane objects, you should be able to start in the Top view and select the things that should be the back view. I would probably Group them. Then go to a Left view and and Rotate Left 90° (⌘L on Mac). Then switch to a Back view and everything should be in the correct orientation. 

     

    You might need to move everything to an appropriate location in the drawing (could be too high or low, or too left or right).

     

    You could also use a Right view and Rotate Right.

  2. One possibility is to draw Polygons or Spaces for each area and give them names.

     

    Then you can add a Criteria of Location is "Name of Polygon" along with whatever other criteria you are using. This will give you just the hoists for that area.

     

    Or on re-reading your original post, it sounds like you want all of the hoists in a single worksheet. If you don't have too many areas you could do a bunch of nested IF statements, something like:

     

    =If (Loc('Area_1_Name','Area 1',If(Loc('Area_2_Name),'Area 2', If(....)))))

     

    however deep you need to go.

     

    Or just add a custom record with a field that defines what the Area is for each hoist and report this in the worksheet.

     

    Or about a dozen different options.

     

    Give us a little more detail on what you are trying to do and why and we might be able to offer a better suggestion.

    • Like 1
  3. Concat might not be in the pull down menu, but you can definitely type it in and it works.

     

    Yes, keeping a BOM correct is always a challenge. Be it that you accidentally duplicated a screw or did not put something in the correct class/layer/record so that the database finds them. Automation is a bitch as it does exactly what you tell it to do, not what you really want it to do.

    • Like 1
  4. Edit the criteria of the worksheet database row to either specifically include the layer that has plot view or specifically exclude the model view or vice versa.

     

    Objects in viewports are counted as separate objects as far as worksheets are concerned, so you have to be specific in WHERE you get/count the objects from.

     

    Ask again if this was not clear enough

  5. Take a look at my edited worksheet. It will answer a number of your questions.

     

    1.  Your criteria was Symbols. That means that you will only be able to get data on the symbols, not on the contained objects of the symbols. I changed the criteria to be Parametric objects and with the InSymbol box checked. That gets you a subrow for each PIO. You could also tell it to be Parametric Objects OR Extrusions. Or you could just attach your Material Record to the PIOs and then use that as the criteria.

     

    2. You will need to attach your Material record to the PIO or Extrusion, not to the symbol. The subrow can look at either the contained objects OR the containing symbol, but not both. It would be nice to have a function that would allow you to access the Parent, but it does not exist yet.

     

    3. Once you have the Material record attached to the correct objects, the rest should be easy.

     

    4. Take a look at the =Concat function in column E to see how to combine multiple data into a cell.  You can replace where it says B3 with the formula in B3, C3, D3, etc. to get a single cell with what you need.   Or you can just leave the multiple columns and set the width to zero so they don't display.

    test for bom - PIO Criteria.vwx

  6. No way that I know of.  Two options:

     

    1.  Pick a field that is the same on all of the items and SUMMARIZE based on that column. That should get you one subrow.  Select the Sum Values option in each column and you should have the same values in the header and the subrow. Hide the headers and you should have what you are looking for.

     

    2. Don't use a database at all and just use the functions with criteria. i.e. =Count((C=;'My_Class'))  Will return the number of objects in the class names My_Class. I don't think you can do this for Record.Field combinations.

    • Like 1
  7. I am pretty sure that VW calculates both the True and False portions of the If statement regardless of which is selected.

     

    In Excel you could use an IsError call to check for the problem and then return the other value. I am not seeing a way to do this in VW tonight.  Let me sleep on it and maybe I will come up with something tomorrow.

  8. the 'Lighting Device'.'Weight' field is text not a number that is why it won't add up.

     

    If you are OK with not being able to change the weight from the worksheet try using =Value(Substring('Lighting Device'.'Weight', ' ' ,1))  Note that there is a space between the single quotes after the field name.

     

    If you want to be able to make changes from the worksheet you will have to use two columns.  Put the Record.Field into one cell and then reference that cell in the Substring call.

     

    You can use the Format Cell Trailer to add the 'lb' back into the display if you want.

  9. Or maybe I should actually try these things before I post them.  😞

     

     

    Many of the fields in the Space object have both an editable and a static text version. The static text version is calculated based on the other entered data and is not editable in a worksheet. The numeric version is typically editable.

     

    'Space'.'SpaceOccupancyRequirements_OccupancyNumber'

     

    Should  be editable in a worksheet.

     

    'Space'.'Occupancy' Is a static text representation and should change if you change 'Space'.'SpaceOccupancyRequirements_OccupancyNumber', but not be directly editable in the worksheet.

     

    Pat

     

     

  10. The objects inside a plant are all in different classes. That is why you are not able to see anything when you set Class to Active Only. The class of both the container (plant, plugin object, symbol, group) and the contained objects (whatever is inside) need to be set to visible to be able to see an object.

     

    If you are trying to see what classes have plants in them, set the visibility of all of the Plant-Whatever classes to be visible. Set the visibility of all the other classes to invisible. As you change the Active Class (shortcut Control Right/Left Arrow), then container objects in that class that contain objects classed as Plant-Whatever will be visible.

     

  11. What is your criteria for the database row? If it is Type is Space, then you do have 71 space objects in the drawing regardless of what you think you have.

     

    Remember that instances of objects in viewports show up in worksheets as objects. You probably want to change the criteria to include the Layer(s) that contain your space objects so they are not counted twice by being in a viewport.

     

    @Boh's idea of adding Layer and Class columns, and possible XCenter and YCenter as well to be able to locate the objects are good ideas also.

    • Like 1
  12. Then it must be the changing of the visibility requires project sharing access. I don't think there is anything I can do about that as the script does not specifically ask for access. It does not seem to me (with zero experience in project sharing) that you should need to own the layer to change the visibility.

     

     

     

  13. I have no idea why it effects project sharing. I have never used the project sharing. My guess is that it is the last line of the script 

     

    Layer(GetLName(ActLayer)); {Force layer to active layer to update Nav Palette}

     

    This sets the active layer to the active layer to force a redraw of the Nav Palette.  Try moving the left brace "{" to the beginning of the line to comment it out and see if that fixes the project sharing issue.


    As for the Message block, just delete the line that reads MEssage(DAte(2,2), LVis);  This was for debugging and I missed removing it.  (I have edited the script above to remove this. You could just grab it from there again instead.)

     

  14. Try this.

     

    Procedure Toggle;
    {If either layer or class specified in Consts is invisible, then sets}
    {both to visible. If both are visible then sets both to invsible.}
    {Change the LName and CName in the Const section to match your desired}
    {class and layer. Note code at bottom to cause proper screen and Nav}
    {palette updates.}
    
    {Warning: Use of this script may cause diziness. Alcohol may make this}
    {worse. Use care when operating a locamotive while using this script.}
    {If you are pregnant or considering becomeing pregnant, consult with }
    {CAD Manager before using this script. Self inflicted hair loss is a }
    {frequent side effect of learning to script. If script does not operate}
    {as intended, Do not pass GO, Do not collect $200. Use at your own risk.}
    {There be dragons. ARRRGH!}
    
    {November 12, 2018}
    {©2018 Patrick Stanford pat@coviana.com}
    {Licensed under the GNU Lesser General Public License}
    
    Const
    	LName='1-Slab';
    	CName='Structural-Slab';
    Var
    	LHand		: Handle;
    	LVis, CVis	: Integer;
    	
    Begin
    	LHand:=GetLayerByName(LName);
    	LVis:=GetObjectVariableInt(LHand, 153);
    	CVis:=GetCVis(CName);
    	
    	If (LVis + CVis) = 0 then  {If both layer & class visible}
    		Begin
    			SetObjectVariableInt(LHand, 153, -1);  {Layer to invisible}
    			ResetObject(LHand);
    			HideClass(CName);  {Class to invisibile}
    		End
    	Else
    		Begin
    			SetObjectVariableInt(LHand, 153, 0);  {Layer to visible}
    			ResetObject(LHand);
    			ShowClass(CName);  {Class to visible}
    		End;
    		RedrawAll;   {For redraw to show hide objects with changed vis}
    		Layer(GetLName(ActLayer));  {Force layer to active layer to update Nav Palette}
    End;
    
    Run(Toggle);

     

    • Like 1
  15. Is the object just off screen after you switch the view? If you have the extrude selected before you switch view try Fit to Objects and see if it shows up. Or zoom way out until it shows up. And then back in on it.

     

    There is also an option in VW Preferences, Display Pane to Center on Objects after View Change. This might solve you problem as well.

  16. You can still do what I suggested, you just have to know the Field Name you are want.

     

    Right Click on the Database (i.e. 3, not 3.1, etc) and choose Edit Criteria.  Click Cancel. In the Formula Bar you will now have a text representation of the Criteria for the database.

     

    Click into the Formula Bar and find the 'Record'.'Field' portion of the criteria and edit those values to be what you want. Hit Return to lock in the edited criteria.

     

    I THINK that as long as what you edit them to is something the criteria builder can display you can still edit the criteria the next time using the Criteria Builder dialog box. I know it is possible to create criteria that are valid for a worksheet that can't be edited with the criteria builder, but I think these are mostly cases of adding extra ANDs and ORs to the criteria.

     

    I am not saying there there should not be improvements in the Criteria Builder, just trying to offer a workaround until the functionality improves

  17. Without seeing the code, it is hard to say.  If they are all similar and you want the same topdown list, you can probably edit each script to use a single include file that has just that portion of the code.

     

    Then you would only need to edit that one include file and recompile each script.

     

    If they are PIOs and are used multiple times in a drawing, you probably don't want to have the Alway Compile setting turned on, so you would need to open each in the Plugin Editor. I don't know of any want to automate that step.

     

    @JBenghiat, @MullinRJ, @Sam Jones  Any of you have any suggestions?

×
×
  • Create New...