Julian Carr
-
Posts
320 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Articles
Marionette
Store
Posts posted by Julian Carr
-
-
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.
- 2
-
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??
-
- 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.
-
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.
- 1
-
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);
-
Maybe it only works in PIOs, which is where I am using it?
-
FWIW, I always use Set3DRot()
-
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?
-
Try this:
SymbolToGroup(h1, 2);
hGroup := NextObj(h1); -
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.
- 3
-
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;- 2
-
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); -
- Popular Post
- Popular Post
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.
- 8
-
I have never be able to make modifier keys works reliably with scripts, but all power to you if you manage to crack it.
-
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');- 1
-
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).
-
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.
-
These two calls might help:
PROCEDURE GetBBox(h1, x1, y1, x2, y2);
FUNCTION IsObjectFlipped(h1) : BOOLEAN;
-
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.
-
I recall years ago someone wrote a script that would create these strings. Can't find it though.
-
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); -
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; -
No worries Peter. Thanks for your noble attempt!
- 1
-
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?
Windoor Accessibility Check
in Troubleshooting
Posted
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.