Jump to content

Pat Stanford

Moderator
  • Content Count

    5,264
  • Joined

  • Last visited

Everything posted by Pat Stanford

  1. Pat Stanford

    GetSpaceNameForObj and specific layers

    If you still have a copy of the file with the problem, click the Bug Submit link under the Community header at the bottom of this page and submit a bug. Ask them to send you an upload link to send them the file. That is the best way to help make VW less "garbage". By the way, almost all software is garbage in most peoples opinion. Read any software forum and they all sound similar to what gets posted here.
  2. Pat Stanford

    GetSpaceNameForObj and specific layers

    Can you post the file or share it privately so we can take a look? Or even a demo of just part of the file showing the problem?
  3. Pat Stanford

    Getting all parameters of build in objects (line, rects, ...)

    A more specific explanation of WHY you want to do something might get you a better answer than a WHAT you want to do. We understand that you want to compare and purge symbols, but a better explanation of where the symbols are coming from and how you end up with multiples that you want to delete will help us to give you a better answer.
  4. Pat Stanford

    How to Import/Ref Levels via Script? (Python)

    Are you using the Design Layer Viewport or the Layer Import options. I think it makes a difference. But I have not found a definite way to make either happen.
  5. Pat Stanford

    Worksheets - Help with formulas

    Off the top of my head I would say no, but you may be able to come up with a hidden column solution for that also. Do the entry somewhere else other than where you want it to display, and then use an If to pull the value in if it has been entered or display 'tba' if it still zero You can certainly manually enter text into a cell that is formatted as a number, but I don't know of a way to display something other than what was entered into a cell that you allow data entry in. So long way of saying you could populate the original version with tba, but if someone changes it, it will not automatically change back. Unless you use the IF as discussed above.
  6. Pat Stanford

    Worksheets - Help with formulas

    @Boh I think I just figured out a work around that will give you what you want, but it will take a couple of extra hidden columns. Put your current %Finished Calculations into a column that can be hidden. I am going to pretend this is column AA. Hours Total is in column I (letter i) In the % Finished Column put a formula of =IF(I17<>0,AA17,0); So Column AA will have the #Div 0 result, but since it is going to be hidden it does not matter. The IF in Column I will ignore the fact that one of the options is an error and will either return the error message or the alternate value. If you would rather have it show the tasks with zero scheduled hours show as 100% complete change the % finished second value to 1 instead of 0. You will need to have four hidden columns, one for each of the Progress checks. If you don't want to have to fix the IF all the time you could do an extra hidden column with just =I17<>0 (pretend this is column AE) and then just use that cell in the IF. =IF(AE17,AA17,0) I hope this makes sense. Now I can finally close this window in Safari 😉
  7. Pat Stanford

    Entering measurements in feet and inches

    You would enter a very similar except you would leave out the dash. Since VW does math in all data entry cells, if you include the dash it will subtract the last 1/2" instead of adding it. 1' 9 1/2" It does not matter if you put in extra spaces between items. You can even mix units in a single entry. 1' 9 1/2" + 25.4mm -> 1' 10 1/2"
  8. Pat Stanford

    Editing text in a parametric object

    If you want to be able to display a dialog from inside a PIO, I think you have to make it Event Enabled (5 times more complicated to script for 10 times more power) and make sure that the dialogs are not in the regeneration loop so they are not triggered on a redraw. I have only done a couple of very simple event enabled scripts. Joshua or others may be better able to help if you actually need that functionality.
  9. Pat Stanford

    How to edit door schedule glass column in 2018 vw

    You can't just add random (or even well considered and necessary) data to a Worksheet Database like you can in a general Worksheet cell. Everything in a Database has to be either a formula (Insert:Formula) or a Record.Field combination. The NGA and NGA2 fields are numeric fields, so you can't put text into them. You can use one of the User Fields from the Data pane of the Door Settings to store the data and then modify the report to show that data where you want it. ='Door'.'UsrFld1' through 'Door'.'UsrFld10' In the worksheet you can then type in anything you want and it will be stored in the Data pane with the specific door it is attached to. You can either enter the data from the Data pane or from the Worksheet Database. If you need more than 10, you will have to add a Custom Record format to your doors to store the extra data.
  10. Pat Stanford

    How to edit door schedule glass column in 2018 vw

    What do you mean "write a word"? GlGlazingThickness is set from the Leaf pane of the Door Settings. Similar settings for Transom, Side Lights, and something else that I can't find right now. By default these are set to 0.05", so they are rounding down to zero in the worksheet. If you truly want the Net Glazed Area, change the formula to ='Door'.'NGA2'. That field appears to return the are in the document units. It looks like Door.NGA returns the area in something close to Square Meters, but appears to be used for internal calculation purposes rather than display units.
  11. Pat Stanford

    How to edit door schedule glass column in 2018 vw

    If you show the Database Headers (Check under the worksheet View menu), what is the formula in the column that is supposed to be showing the Net Glazed Area? I think that it should be ='Door'.'NGA' If it it something else tell me what and I will see what I can figure out.
  12. Pat Stanford

    Worksheets - Help with formulas

    I have been fighting this off and on for a week and can't seem to crack it. Apparently, VW evaluates both of the possible outcomes of an IF statement and throws up the VALUE or DIV BY 0 error if either one fails, even if that is not the one you want. I have looked at options of trying to use a combination of Value and Concat to determine is a cell has a number or not, but so far I have not found the trick. If you have enough control over how this will be uses, we could work on a custom Worksheet Script that would do the proper error checking, but it will either need to be stored in ever users User Folder or Workgroup Folder or in every file. If you don't have control over the environment and how the files are used, this will probably break pretty easily.
  13. Alternatively, I wrote a script back in 2009 that does a substring find/replace in a selection of worksheet cells. In a very quick test it seems to still work in 2019.
  14. Pat Stanford

    GetSpaceNameForObj and specific layers

    Worksheets find instances on both Design Layers and in Viewports on Sheet Layers. Try limiting it to just a single design layer. Unless you have Design Layer Viewports on that layer in which case you will have duplicates.
  15. Pat Stanford

    GetSpaceNameForObj and specific layers

    What about putting the layer in the Database Header and then just using GetSpaceNameforObj() without any criteria in the column formula. It should inherit the criteria from the database.
  16. Not the best solution, but probably workable for what you want: Edit Criteria for the row in question and then click Cancel. The formula for the criteria should be displayed in the Formula Bar of the worksheet. It will look something like this: =DATABASE((INSYMBOL & (INVIEWPORT & ALL & ((R IN ['__PDF']) | (R IN ['__PDF']))) & (L='Design Layer-2') & (T=SOLIDCSG))) In this case I have gotten the PDF Record criteria added twice. Click into the Forumula Bar and delete the criteria you don't want. In this case will delete from the vertical bar (which indicated a logical OR function) to the first close parenthesis after the '__PDF to get: =DATABASE((ALL & (INVIEWPORT & INSYMBOL & ((R IN ['__PDF']))) & (L='Design Layer-2') & (T=SOLIDCSG))) Then right click in the row header and choose Edit Criteria again to make sure you have edited it correctly. The ampersand (&) characters above are a logical AND symbol. You would delete one of them and everything before or everything after to the next & in most cases. Easier criteria editing are certainly a good wish.
  17. I found the sometimes split case when I was working on filing a bug report. I think this needs to be researched deeper to make sure I am reporting the correct bug. I should send it later today.
  18. More and more convinced it is a bug. An extrude on a a different layer can not be split. But split it first on the active layer and then the resulting Solid Section can be split on a non-active layer. A sphere on a different layer can not be split. But split it first on the active layer and the resulting Solid Section can NOT be split on a non-active layer.
  19. I am seeing the same thing. Either a bug or else WAD (Working as Designed), but with a bad design.
  20. Pat Stanford

    Customizing OIP

    SetRField only handles strings. It can be used to write into a field formatted as a number, but you will need to make sure the string passed converts to a valid valuator the format you are writing to. So in an Integer or number field you would have to pass something that VW recognizes as number. 2, 7.123, 0.0008, 17.3", 256.456 mm. Think about it this way, if you can type it into a field and have it respond properly, then that is the string you need to pass to SetRField. GetRField will also return the String equivalent of the number, so if you can you are better off using the Record.Field combination so that you don't have to do any conversion and get the value directly from numeric fields.
  21. I just did a test on VW2019 SP3 and it split an object not on the active layer without a problem. There is something else going on.
  22. Pat Stanford

    GetSpaceNameForObj and specific layers

    Edit the criteria you pass so that it is also limited to a layer? =GetSpaceNameForObj(((L='Your Layer Name') & (T=DOOR))) [The above is from memory and not guaranteed to be correct. Use Insert Criteria function to get the proper criteria you need]
  23. Pat Stanford

    Single twist steel rod and bar...

    Similar to Kevin, I would make an extrude that is the length of the twisted part and use the Deform Tool to twist it. Then I would use the Push Pull Tool to extend the end faces to get the correct length. This saves the having to add solids step.
  24. Pat Stanford

    Script to automate publishing

    Something like this Applescript. Note that the entire procedure Delay (a Vectorscript) is embedded in the applescript. You could use Applescript to modify what you send to the run Vectorscript command to do whatever you would like. Later in the script is a simpler one line script to run a menu command in Vectorworks. This script has been recompiled to work with VW2019, but has not been run since VW2010, so no guarantees. Posted here as a learning reference. (* VW Batch DWG Rev 2.scpt Batch DWG Export from Vectorworks Patrick Stanford Coviana, Inc. pat@coviana.com October 23, 2009 This script is a demonstration of how to use Applescript combined with VectorScript to open a series of VW2010 files one at a time, perform some action on each file and then export each one to DXF/DWG using the default settings. It Automatically overwrites any previous export file in the same location. If there is not export file it creates one. It also saves the changes made to the original file by simulating a command-S. Depending on the speed of the computer running the script and the size of the files, it may be necessary to extend some of the delays or to add delays at certain steps. The script was tested on a 2.53GHz MacBook Pro with three very small VW files. The VectorScript code can be put into the Applescript in place of the Delay procedure either as raw text, or as a DoMenuTextByName call to a command installed in the current workspace. I recommend an export be done manually to ensure that the proper settings and directlries are selected prior to running the script in automatic. *) tell application "Finder" set theFolder to (choose folder) set theFiles to files of theFolder whose file type is "DO15" end tell repeat with onefile in theFiles tell application "Vectorworks 2019" activate open onefile delay run VectorScript " Procedure Delay; Var N1:Integer; Begin For N1:=1 to 2 do Begin Message(Date(2,2),' Delay:',N1); Wait(1); End; CreateText(Date(2,2)); End; Run(Delay);" delay 2 ignoring application responses run VectorScript "DoMenuTextByName('Export DXFDWG',0);" end ignoring end tell delay 2 tell application "System Events" tell application process "Vectorworks 2010" key code 36 -- return to accept Export params delay 2 -- wait for next dialog box key code 36 -- return to accept file name and location delay 3 -- wait and see if we get replace yes/no dialog if title of window 1 as text = "" then keystroke "o" using {command down} end if delay 2 -- wait for dialog to be dismisses key code 1 using {command down} -- s key Save file end tell end tell delay 3 tell application "Vectorworks 2019" close document 1 saving no end tell end repeat
  25. Are your layer options set to Show/Snap/Modify Others?

 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×