Pat Stanford

Moderator
  • Content count

    4,618
  • Joined

  • Last visited

Community Reputation

273 Spectacular

About Pat Stanford

  • Rank
    Vectorworks Addict

Personal Information

  • Homepage
    vectortasks.com

Recent Profile Visitors

2,684 profile views
  1. At least in 2016 when worksheet scripts were introduced, they were available in Fundamentals. I would assume that they are still available in 2018, but I have not tested. You could test using a simple script using the DisableModules VS command to temporarily change the version you have to Fundamentals. If you test, please report back on your results.
  2. If you need accurate scale be careful. That option will scale things down so that everything in the printable area fits within the page margins. For scale where borders don't matter, it is often better to just force to one page and allow the little bits that run onto pages 2-4 to be ignored.
  3. The pseudo code as you describe it is correct. It just becomes a couple of While Not loops or Repeat Until loops to compare the passed parameters to the read data. If you are going to to the trouble of writing it, I would also pass the name of the worksheet to lookup in and possible the range (row and column) to compare. Also note that as of 2018 SP3, there is no was to get a reference to a database subrow, so this is only possible in actual spreadsheet rows, not in a database.
  4. It is probably as Art says, that the margins are forcing part of the drawing onto the edge of additional pages. You could also "fix' this by just changing the settings in the left hand side of Page Setup to 1 page horizontal x 1 page vertical. You might lose a little bit of the drawing the would extend onto the other pages.
  5. You can't get data directly from the OIP. You have to get it from the object parameter record. Your Parameterenam2 line is the right idea, you just have to put in the correct data. I am running for a plane and don't have time to research the field names, but I hove posted a script that will give you that information. Just place a single instance of the object on the active layer, leave it selected and run the script. You will get a worksheet that will list all of the available fields for that object type.
  6. This is really quick off the top of my head, but try adding an addition set of parenthesis around the B4-C4. I think VW may be converting the C4<0 to a number and then subtracting that from B4. Also, your formulas should be using row 5 not row 4. =IF((B5-C5)<0,B5,C5)
  7. It has something to do with the LXTest Class. If you edit the Class and check the Use At Creation and click Yes to apply to objects already in the drawing you get the proper display. Beyond that I don't know where the objects are currently getting their attributes from.
  8. Most often visibility issues are associated with Classes or Layer or Class Options. Do you have the Class Options (or the Layer Options if the lights are on a different Layer) set to Grey or Grey/Snap Others? Do you have the Class the light objects are in set to display as Grey in the Visibility column of the Navigation Palette? (Third column, looks like a light grey eyeball. Second column is Invisible).
  9. To pull it into a worksheet Josh's method above will work very easily and no scripting required. I am an engineer, and I am still always amazed and the "math" solutions that @JBenghiat, @michaelk (math major in college) and @MullinRJ come up with. Something like the following should do what you want. Note that this is off the top of my head and not tested or run in VW in any way. Based on your previous statement, it appears you already know how to open a file for writing to.: Var X1,Y1,X2,Y2 : Real; H1: Handle; Begin H1:=FActLayer; {Get the first object} While H1<> Nil DO Begin IF GetType(H1)= 2 Then DO Begin GetSegPt1(H1,X1,Y1); {Gets the start point of the line} GetSegPt2(H1,X2,Y2); {Gets the end point of the line} WritteLN(Concat(Num2StrF(X1),Tab(1),Num2StrF(Y1),Tab(1),Num2StrF(X2),Tab(1),Num2StrF(Y2))); {write out the 4 values separated by a tab character} H1:=NextObj(H1); {Go to the next object in the layer. NextObj works because FActLayer game a handle to a list pointing to only objects in the layer) End Else H1:=NextgObj(H1); {If it is not a line just go to the next object} End; {End of the While loop} End; Write back if you need more help
  10. Yes, such a script can be written. But before you start, make sure you really think through the problem and know what you are trying to do. The commands to get the end points of lines are different than getting the corner points of rectangles which are different than getting the points of polygons. Think about how you are going to use the data. If you are really going to import it to Excel, do you really want the data on two lines with the Start and End text? Should that all be a single block of text, or should the text be in one cell and the number in a different cell. Do you really need to export to Excel, or would a VW Worksheet work? From there you could copy/paste into excel. I will be happy to try and assist, but based on the minimal description you have given, it feels like this may be a "Can you make it do this too." project. Define is a little more. Tell us WHY you want to do this, not just that you want to, especially if you want to learn how to write the script, you will get a lot of help here.
  11. I am coming through NYC and need to have about 20 D and E size sheets printed for pickup on Wednesday. Staying near and traveling through Penn Station, so something close would be best. Do any of you New Yorkers have any suggestions? Thanks, Pat
  12. Foam padding on the beam and rafters and helmets? ;-)
  13. Check and see if the CreateCustomObjectPath command is more to your liking. It will make a solid object instead of a bunch of surfaces. It is a newer command and more likely to work they way you are asking for.
  14. Not simply. You could write a PlugIn Menu Command that you could add to your workspace and give a keyboard shortcut to. The script could be pretty easy. For End Points it would be: SetPref(1027, Not GetPref(1027); The other available codes are located in the Vectorscript Function Reference, in the SmartCursor/Apperance section. It is available online at http://developer.vectorworks.net/index.php/VS:Function_Reference_Appendix Ask again if you need help to get this working.