Jump to content

Julian Carr

Distributor
  • Posts

    315
  • Joined

  • Last visited

Everything posted by Julian Carr

  1. 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.
  2. 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);
  3. Maybe it only works in PIOs, which is where I am using it?
  4. FWIW, I always use Set3DRot()
  5. 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?
  6. Try this: SymbolToGroup(h1, 2); hGroup := NextObj(h1);
  7. 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.
  8. 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;
  9. 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);
  10. 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
  11. I have never be able to make modifier keys works reliably with scripts, but all power to you if you manage to crack it.
  12. 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');
  13. 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).
  14. 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.
  15. These two calls might help: PROCEDURE GetBBox(h1, x1, y1, x2, y2); FUNCTION IsObjectFlipped(h1) : BOOLEAN;
  16. 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.
  17. I recall years ago someone wrote a script that would create these strings. Can't find it though.
  18. 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);
  19. 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;
  20. No worries Peter. Thanks for your noble attempt!
  21. 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?
  22. Is there any way to expand or collapse a widget separator group using VS? For example the LABEL line group below... Thanks!
  23. This should get you started. It creates 3D loci not stakes, but maybe someone else will offer that bit: Procedure ReplaceTextWith3DLoci; Procedure DoIt(h1 : HANDLE); VAR pX, pY, rAng : REAL; r1 : REAL; Flag : BOOLEAN; i1 : INTEGER; s1 : STRING; BEGIN s1 := GetText(FSActLayer); i1 := Pos(' ', s1); IF i1 = 1 THEN Delete(s1, i1, 1); i1 := Pos(' ', s1); IF i1 > 0 THEN BEGIN Insert('.', s1, i1); Delete(s1, i1 + 1, 1); END; IF NOT ValidNumStr(s1, r1) THEN r1 := RealDialog('Z value:', s1); GetTextOrientation(h1, pX, pY, rAng, Flag); Locus3D(pX, pY, r1); IF h1 <> Nil THEN DelObject(h1); END; BEGIN IF YNDialog('Replace text blocks with 3d loci?') THEN BEGIN ForEachObject(DoIt, (T = 10) & (Sel = True)); END; END; Run(ReplaceTextWith3DLoci);
  24. If you get a handle to the parent, then use FInGroup() and NextObj() to cycle through the objects in the group, then use Selected(), it might work. An alternative would be to use FInGroup(), check the first object is not selected using Selected(), then jump straight to the selected object using NextSObj(). All just a guess mind you.
  25. Nice one Robert. We've actually had a command like this in the Object Context menu for ages (code below). What I find though, is that it is often a bunch of objects that you want to isolate for a few minutes, so the process in that case is to select the objects, Edit menu > Invert Selection then right click and choose Hide Selected Objects. There should probably be two commands - Hide Selected Objects and Hide Unselected Objects. I added the active layer to the criteria so objects on other layers didn't inadvertently get hidden. We have a matching Show Objects in the Document Context menu. { HideSelectedObjects v 1.1 - Developed by OzCAD Pty Limited } Procedure HideSelectedObjects; VAR gLName : STRING; BEGIN gLName := GetLName(GetLayer(FSActLayer)); Hide((Sel = True) & (L = gLName)); ForEachObject(SetDSelect, (Sel = True) & (L = gLName)); END; Run(HideSelectedObjects);
×
×
  • Create New...