Jump to content

Pat Stanford

Moderator
  • Posts

    12,703
  • Joined

  • Last visited

Everything posted by Pat Stanford

  1. In your cost and weight fields did you include characters other than numbers and number separators ('.', ',')? Are the fields formatted as Text or as some form of Number? If the fields have other characters, then they have to be Text type fields. VW can not do math on text, only on numbers. It can Summarize (collapse subrows that have the same value into a single subrow), but is can not do a mathematical sum. Text fields are always counted (or math summed) as individual instances. You may be able to create a function using SubString and Value functions that will extract the numerical data and then do a math sum on that. Or, you may have to go back and edit your record format to use numerical fields. The problem then is when someone else uses your format and enters prices in Canadian Dollars and weights in Kg instead of pounds, your sums will be off. I keep hoping that VW will add additional "known units" (like length and area are now) to the program so you could define a field as currency or as weight and have the conversions between different units done for you. HTH.
  2. Remember that your 2016 workspace will not have any of the new commands for 2017. You will want to go through and make sure you add the new things you want into your workspace. Also, if you have a command that ends up greyed out or not working, it is possible that the internal bindings for that command have changed. Try deleting the 2016 version of the command and adding the 2017 version back in to the space place and add the same shortcuts.
  3. Interesting. I only tried it for Layers and then looked at the options for classes and did not see a CONTAINS option in the criteria builder and assumed it would not work for Classes either. I doubt it is a bug on Layers. Layers live in an entirely different List inside Vectorworks. Ever noticed that you can have a Layer with the same name as a class or any other object. Like I said before, It would be a good wish to have Wildcard for Layer names be acceptable criteria.
  4. It looks like the person who sent you the file is using a custom door PIO, not the standard VW door. Unless you get the same PIO, you will not be able to modify the parameters of the door. You could changed them to normal VW doors, but you will have to transfer all the data by hand or find someone to write you a script to do the transfer. I would start with a conversation with the person who supplied you the drawing about the Dialog plugins.
  5. Since you have Macs, we can probably build an AppleScript/Vectorscript workflow that will do what you want. If you are interested in discussing this further, please send me a private message so we can discuss the details of what you want this to do and how much time it is likely to take to do it.
  6. OK, Try this: Procedure AddIdentifierToField; {©2017, Patrick Stanford, pat@coviana.com Licensed under the LGPL} {No Warranty Expressed or Implied. Test thoroughly before using on production data} {Make a backup copy before running} {May change data in hidden but selected objects in groups, symbols, etc.} {Do no operate heavy machinery while using. May cause drowsiness} var AddedString:String; Procedure AddLetter(Hd:Handle); Var S1,S2,S3:String; P1:Integer; Begin S1:=GetRField(Hd, 'MyRecord', 'MyField'); P1:=Pos('.',S1); S2:=Copy(S1,1,P1-1); S3:=Copy(S1,P1,(Len(S1)-P1+1)); SetRField(Hd, 'MyRecord', 'MyField', Concat(S2, 'A', S3)); {Change the middle string to whatever you want your letter to be} End; Begin ForEachObject(AddLetter, (((R IN ['MyRecord']) & (SEL=TRUE)))); {Options set to do selected object on active layer including objects in groups} End; Run(AddIdentifierToField); Change ever occurrence of MyRecord and MyField in the script to the names of your record and field. Change the letter in the SetRField line to what you desire. Let me know if you need more help.
  7. The first issue is to make sure that your Number field is formatted as TEXT not as a Number. If it is a number type field they you will not be able to add a letter. Also, do you want to add the letter to every object in the file that has the record? Only ones that have a number in the field? How do you want to make sure you don't accidentally add duplicate letters if one has already been added? The script will not be hard. The outline if we use exactly what you have above would be: Function AddLetter(Hd:Handle):String; Var S1,S2,S3:String; P1,Integer; Begin S1:=GetRField(Hd,YourRecord.YourField); P1:=Pos('.',S1); S2:=Copy(S1,1,P1-1); S3:=Copy(S1,P1,(Len(S1)-P1); AddLetter:=Concat(S2, 'Your character to add', S3); {Change the middle string to whatever you want your letter to be} Begin ForEachObjectInList(AddLetter, 2, 1, FSActLayer); {Options set to do selected object on active layer including objects in groups} End; Please note that the script before was written in the browser and has not been tested and is not a complete script. Please try on dummy objects in a test file before attempting to use anything on your real data. ALWAYS make an extra backup copy before doing anything that is kind a a global replace just in case something goes wrong. Write back if you need more help.
  8. I don't think there is a way to use a substring in a layer name or a classname as criteria for a worksheet. If you want to get fancy, you could write a Vectorscript that would present a dialog box of the layers allow a multiple selection and then have the script create the criteria for the database. The hardest part will be the dialog box. There was another thread here recently that was talking about a selectable list of either layers or classes that would be a good place to start. You can put multiple layers into a criteria is you edit the criteria manually. Something like: =DATABASE((L='Layer-3') | (L='Design Layer-2')) The vertical bar indicates a logical OR so it will return things on Layer-3 OR Design Layer-2 Other fields like Name and (I think) Field values will allow you to use a wildcard of * So another possibility is to write a script that will store the current layer into a custom Record.Field and then use that field with wildcards as the database criteria. The problem is that if you move an object between layers (or add more objects) you will have to remember to rerun the script or manually update the field. Wildcards for Layer and Class names would be a good wishlist item.
  9. I still have absolutely no idea what you are talking about. If you want help with Vectorworks, (or at least from me), you are going to have to use terms that we (I) understand. Dashboard, speedometer, traffic light are not VW terms. It sounds like you want to extract data form a drawing and display it somehow. What data do you want to extract and how do you want it displayed? It really sound like you have picked up a jargon dictionary and are just spouting random terms rather than trying to ask a question and get a real answer. Sorry if I am just being dumb.
  10. What is your definition of a dashboard script? What are you trying to do?
  11. I don't know what is going on in your drawing. In a simple test drawing here it works just as you would expect it. I get one of the walls split in two and joined on both sides of the other wall. What do you get in a new clean file with newly drawn walls? What happens when you copy and paste the problem walls into a new clean file? What are the settings for Caps on the two walls? Have you restarted VW? Have you restarted your computer?
  12. gester, Exactly what formula did you use for the database cells and what for the spreadsheet cells. As Michael says, the change is for most functions between the spreadsheet and database. In a database, the database criteria already specify what objects and the sub-row specifies exactly what objects are in the row, so the functions just use that data to be the objects the function should apply to. In a spreadsheet, you need to add the criteria into the parameters passed to the function so it know what objects to work on. Most of the worksheet functions don't take any parameters, so in a spreadsheet cell it is just =function(criteria). The CompAreaByName function already requires a parameter (the name of the component), so in a spreadsheet you need to pass two parameters separated by a comma =function(criteria, parameter) {=CompAreaByName(Criteria, ComponentName) HTH.
  13. Take a look at this thread for a method to eliminate the "missing" spaces. Write back if you need more information.
  14. It works in both spreadsheet and database cells for me. In the spreadsheet you need to include the criteria as the first parameter inside the parentheses =COMPAREABYNAME(C='Dimension', 'Gypsum Board') In the database you don't need the criteria =COMPAREABYNAME('Gypsum Board')
  15. And if you want to be able to reuse that title block in other files, you probably want to put it into the Default Content. The best place is in your Users Folder. Save a VW File containing your TB symbol there and restart VW. On the Mac this would be User Name:Library:Application Support:Vectorworks:2017:Libraries:Defaults:Sheet Borders - Title Blocks The next time you go to insert a Sheet Border, you should be able to choose your title block from the default options offered.
  16. Are you on Mac or Windows? If Mac, then you could probably work up an Applescript function that would do what you need. I can probably help you get started on the script. Otherwise, just Batch Convert a folder at a time. Neither are good options.
  17. Get handles to the object you want to make part of the symbol and to the Symbol Definition. Then use Boolean:=SetParent(ObjHand, ContainerHand); (Sorry for the Vectorscript version. I am not up to speed enough to do Python of the top of my head.)
  18. I see options in the Format Field for Length and Width in addition to Calculate Room Dim. If you click the Manage Space Labels you can add as many field to the label as you need. If you click the Edit Layout button you can move the text blocks around to get the arrangement you want. If you click the Edit button to the right of the Format Field you can add prefix and suffixes as necessary to each field. Let me know if this is not clear and I can send pictures.
  19. Have you tried restarting VW and the computer? I have a MacBook Pro 10.11.6 and VW2017 SP2 and I get a new blank file when I choose that option. If you have a template file named Default.sta in your user folder (User/Library/Application Support/Vectorworks/2017/Libraries/Default/Templates) that will be used to create the new "blank" document that is opened when VW is started (if you have that option chosen in VW Preferences Session pane). Perhaps this is somehow being triggered. Check and see if that template file exists. If it does, then move it to your desktop, restart VW and see if that solved the problem.
  20. Is it just an issue of how the label is created? Can you change the order the fields to match what you want? For me, the "Height" field in the Space Object Record is Length. The "Width" field in the Space Object Record is "Width" Put them in the order you want and them put the other text you want around them.
  21. Start with a wall as long as needed for the farthest points and then reshape both the top and bottom back. If you start off with it too short, go to a plan or elevation view and use the selection tool to extend the wall and then reshape. Does that make sense?
  22. This is a case for use of the Reshape tool to add Wall Peaks to make the cutouts
  23. The Space Object with a custom label type can do this right now. The biggest drawback would be that it does not do "rotated" rectangles very well. You have to draw them as polygons. But you could draw the rectangles and then use the Create Objects From Shapes command (AEC Menu) to make them into Spaces. If that is not enough, it would not be a hard PlugIn Object to create, but you need to sit down and think about EXACTLY you want the object to do. What happens when the rectangle is drawing Vertically/Horizontally? What happens if the rectangle is drawn at an angle? What should happen if the object if rotates or flipped after it is drawn? What size should the text be? Should the font be fixed or changeable? Should the text always be right side up? Or should it rotate with the rectangle? There are probably about 100 other questions and possibilities that should be considered. For the most basic version it would probably take a couple of hours to write, but you are likely to end up with an object that is almost good enough for almost 70% of the times you need it and you will likely quickly stop using it as it does not work for enough cases. For the more complicated case it would probably take 10-20 hours of a good programmers time to get it completely right. And if you don't get the specification right the first time and keep coming back and asking for changes 30-50 hours.
  24. Hopefully one day, but it is not that easy. First, currently VW does not understand weights. I know they are just numbers, but what happens when someone enters a weight in KG and the person using that data is expecting pounds. The load is 2.2 times higher. Who is responsible for the result? So VW needs to understand weight units and automatically convert between them just as if currently does with linear and volumetric dimensions. Second, there is no actual engineering formula for a system with more than 2 lifting points. If you put 3 chain hoists on a truss and lift it, it is "impossible" to calculate the load that will be carried by each of the hoists. As soon as you make a small adjustment to the length of one of the leads, the load carried by the other two changes. Often drastically. So even if you get the point load calcs, it is unlikely that VWI would ever take the risk of doing so for more than a 2 point lift. It is easy for an individual to say "Oh, that is close enough." Much harder for a company with deep pockets to take that kind of a risk when they have no knowledge of how the resulting data will be used.
  25. I think you need to give us a better explanation of what you want to do. You can put associated dimensions on the drawing on any rectangle. If you change the dimension object the rectangle will change. You can change the rectangle in the Object Info Palette (OIP) and the rectangle will change and the dimensions will as well. Are you trying to keep the aspect ratio?
×
×
  • Create New...