Jump to content

Julian Carr

  • Posts

  • Joined

  • Last visited

Everything posted by Julian Carr

  1. Unfortunately this is not possible as it was developed specifically for the Australian and New Zealand markets, and there would be a lot of work involved to start supporting other countries, some of which have very different standards or ways of displaying compliance.
  2. The WSListIDs.vss script is only going to work for IDs. It would be possible to create a script that worked with a specific User field that was storing room numbers and populate them into a single cell, but it is not a trivial task and would need python or Vectorscript knowledge to accomplish it. FYI, all the WinDoor videos are now at the Vectorworks University here.
  3. Yeah that was my exact thinking too Peter and the first thing I tried. The parent is the symbol definition though, not the symbol instance. I then wrote a DatabaseByScript script to build a list of the symbol instances, then look inside those for the doors: Procedure Test; Procedure DoIt(h1 : HANDLE); VAR h2, h3, h4 : HANDLE; s1 : STRING; BEGIN WSScript_AddHandle(h1); { add handle to symbol instance } s1 := GetSymName(h1); h2 := GetObject(s1); h3 := FInSymDef(h2); REPEAT IF GetType(h3) = 68 THEN BEGIN h4 := FIn3D(h3); REPEAT IF GetType(h4) = 86 THEN WSScript_AddHandle(h4); { add handle to door objects } h4 := NextObj(h4); UNTIL h4 = Nil; END; h3 := NextObj(h3); UNTIL h3 = Nil; END; BEGIN ForEachObject(DoIt, (T=15)); END; Run(Test); This gets the data I need on different rows: but there is no way to combine the door ID, Unit Type and Unit No. that I can see??
  4. I am using symbols for repeated apartments in a building. Each apartment symbol instance has a record attached that contains a field for the apartment type and apartment number. The apartments contain doors in walls that need to be numbered in a schedule, and the required numbers are a concatenation of the door ID + apartment type + apartment number. So in one WS row I need to derive the three bits of data. A DB worksheet reporting doors with INSYMBOL will identify the door objects, but these are derived from the symbol definition and not the symbol instances, so there is no path to the apartment information there. Using DatabaseByScript I can build a DB that contains handles to the door objects and apartments in separate rows, but there is no ability to mix that data. Can anyone think of an approach where this might work, using DatabaseByScript and/or RunScript? For example, is it possible for a DatabaseByScript script to not only build a list of handles, but to populate cells in the row via WSScript_SetResStr()? Thanks.
  5. Explode = SymbolToGroup() = STG. If it will be a PIO and you want to rotate a symbol in the Z axis, then it must not be hybrid. You will need to investigate a way to restore the view after you switch it to 3D for the STG. Alternatively if the symbols don't contain groups or nested symbols, then you could get a handle to the symbol definition, enter the definition, loop through and duplicate 3D objects then use SetParent() to move them to the PIO, all within BeginGroup/EndGroup, then rotate the group.
  6. Assuming this is just a script not a PIO, this should work: VSave('XYZ'); DoMenuTextByName('Standard Views', 2); { top} Explode; VRecall('XYZ'); VDelete('XYZ'); Also, the following will be true for a 3D object (mostly): GetObjectVariableBoolean(h1, 650);
  7. Maybe it only works in PIOs, which is where I am using it?
  8. It works in my code as does this: BeginGroup; Symbol(GetSymName(hSym), x1, y1, GetSymRot(hSym)); SymbolToGroup(LNewObj, 2); EndGroup; hGroup := LNewObj; But does SetRot3D() support groups?
  9. Try this: SymbolToGroup(h1, 2); hGroup := NextObj(h1);
  10. You can select multiple WinDoor/Window/Door instances, then right click on one on the selected objects, choose Plug-in Object Options, turn on Use Wall Closure and it will be applied to all selected objects.
  11. Even better as a function: Function GetDimAngle(h1 : HANDLE) : REAL; VAR h2 : HANDLE; i1 : INTEGER; r1 : REAL; b1, b2, b3 : BOOLEAN; BEGIN h2 := FIn3D(h1); REPEAT IF (GetType(h2) = 2) THEN BEGIN GetMarker(h2, b2, b3, i1, r1); IF b2 | b3 THEN BEGIN b1 := True; GetDimAngle := HAngle(h2); END; END; h2 := NextObj(h2); UNTIL (h2 = Nil) | b1; END;
  12. Hi Dom, Try this: Procedure T; VAR h1 : HANDLE; b1, b2, b3 : BOOLEAN; i1 : INTEGER; r1, rAngle : REAL; BEGIN h1 := FIn3D(FSActLayer); REPEAT IF (GetType(h1) = 2) THEN BEGIN GetMarker(h1, b2, b3, i1, r1); IF b2 | b3 THEN BEGIN b1 := True; rAngle := HAngle(h1); END; END; h1 := NextObj(h1); UNTIL (h1 = Nil) | b1; Message('Angle is: ', rAngle); END; Run(T);
  13. You should not need to change any Vectorworks Preference setting for Wall Closures to work with WinDoor. The following video demonstrates how to get it working and incidentally, it works exactly the same way for Door and Window objects. WinDoor Wall Closure.mp4
  14. I have never be able to make modifier keys works reliably with scripts, but all power to you if you manage to crack it.
  15. Something like this: IF GetCVis('▲ 00 standard - hairline 0.18') < 0 THEN ShowClass('▲ 00 standard - hairline 0.18') ELSE HideClass('▲ 00 standard - hairline 0.18');
  16. The bounding box is only that. It knows nothing of the rotation state and will only be of use to you if the oval is drawn using the first mode (box mode).
  17. GetBBox() will easily tell you the orientation of the oval if you compare the distance between x1 and x2 with the distance between y1 and y2. If the latter is greater then it was drawn tall. I think IsFlipped() will only work with objects that store the flip status, which likely doesn't happen with symmetrical 2D objects like ovals.
  18. These two calls might help: PROCEDURE GetBBox(h1, x1, y1, x2, y2); FUNCTION IsObjectFlipped(h1) : BOOLEAN;
  19. I think you will find the problem is only with the decimal precision you have set in the Units dialogue. Increase this to 2 or 3 and you should see the decimal places correctly.
  20. I recall years ago someone wrote a script that would create these strings. Can't find it though.
  21. Here's an example that might help: Procedure T; VAR s1 : STRING; BEGIN s1 := Concat('(', '''My Plug-in''','.','''My Field Name''','=','''CS''', ')'); AlrtDialog(s1); END; Run(T);
  22. I think you'll need something like this (untested): Function DoesClassExist(sMyClassName : STRING) : BOOLEAN; VAR i1 : INTEGER; BEGIN DoesClassExist := False; FOR i1 := 1 TO ClassNum DO BEGIN IF ClassList(i1) = sMyClassName THEN BEGIN DoesClassExist := True; i1 := ClassNum; END; END; END;
  23. No worries Peter. Thanks for your noble attempt!
  24. Thanks Peter. Actually I know how to add a separator. The question was, it there a way to expand or collapse a whole separator group to achieve the same result as if you manually clicked the little black triangle on the left of the separator row?
  • Create New...