
Julian_Carr
Vectorworks, Inc Employee-
Posts
36 -
Joined
-
Last visited
Reputation
62 ExcellentPersonal Information
-
Location
Australia
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
-
Change multiple viewport rendering styles with 1 Click
Julian_Carr replied to Mat Caird's topic in Vectorscript
EditOpenGLPrefs() will allow you to set it for the document. But can't you just use Custom Modification command to edit all the viewport > background render settings in one hit? -
LOC doesn't work in symbol definitions so you might need to get the centre of each object in the symbol then check it is within the LOC rectangle using PtInRect().
- 1 reply
-
- 1
-
-
Yes it requires an event enabled PIO. Here is a code snippet: CONST kWidgetGroupMode = 81; kWidgetSeparator = 100; kWidgetGroupAutomatic = 2; VAR gb1 : BOOLEAN; gb1 := SetObjPropCharVS(kWidgetGroupMode, Chr(kWidgetGroupAutomatic)); gb1 := vsoAddWidget( 1, kWidgetSeparator, 'MY FIRST GROUP' ); gb2 := vsoAddParamWidget(2, 'ParamName1', 'Actual Param Name 1 to Display in OIP'); gb2 := vsoAddParamWidget(3, 'ParamName2', 'Actual Param Name 2 to Display in OIP'); gb2 := vsoAddParamWidget(4, 'ParamName3', 'Actual Param Name 4 to Display in OIP'); gb1 := vsoAddWidget( 5, kWidgetSeparator, 'MY SECOND GROUP' ); gb2 := vsoAddParamWidget(6, 'ParamName4', 'Actual Param Name 4 to Display in OIP'); gb2 := vsoAddParamWidget(7, 'ParamName5', 'Actual Param Name 5 to Display in OIP'); gb2 := vsoAddParamWidget(8, 'ParamName6', 'Actual Param Name 6 to Display in OIP'); Additionally you could add vsoWidgetSetIndLvl(8, x ); if you wanted to further indent one of the parameters, where X = 1 or 2 or 3 being how far it is indented.
-
Help with script to automaticly create wall hole object
Julian_Carr replied to MarcelP102's topic in Vectorscript
I don't know if your approach will work using DoMenu calls, however you will need to get a handle to the symbol definition. Currently your handle is to a symbol instance. Get the name of the symbol instance then use GetObject() to get the definition handle. One tip. Wall hole objects normally extend beyond the faces of the wall. If you get it working, consider scaling the wall hole object in the Y direction using: SetObjectVariableReal(h3DHole, 632, rScaleFactor); -
The attached file contains two scripts that will do this – one for Cut and one for Copy. The scripts could easily be converted to menu commands and will only work if the symbol is selected then edited from the active layer by double clicking or via a keyboard shortcut. They won't work for a symbol edited from say the Resource Manager and might not work if you are within a group within a symbol. I wrote these just now while watching the footy so testing has been very limited. Use discretion until you have confidence they work as expected. Copy From Symbol Paste in Place.vwx
-
Tracking the Stacking Order in Symbol Components
Julian_Carr replied to Julian_Carr's topic in Vectorscript
Thanks Pat. Your idea worked for 95% of cases which is good enough. Here is the final proc I came up with: Procedure ConvertIt(h1 : HANDLE); { convert all polylines to polygons } VAR h2, h3, h4 : HANDLE; b1 : BOOLEAN; BEGIN { ConvertIt } IF GetType(h1) = 21 THEN BEGIN h3 := GetParent(h1); { h3 is handle to polyline container } h2 := ConvertToPolygon(h1, 8); { new polygon is created on active layer! } SetObjectVariableBoolean(h2, 1160, True); { make polygon screen plane } b1 := SetParent(h2, h3); { move new polygon to polyline container } HMoveBackward(h2, True); { move new polygon to back of container } h4 := FInGroup(h3); { get handle to first item in container group } REPEAT IF NextObj(h4) <> h1 THEN BEGIN HMoveForward(h2, False); { move new polygon forward to same stack position as polyline } h4 := NextObj(h4); END ELSE h4 := Nil; UNTIL (h4 = h1) | (h4 = Nil); DelObject(h1); { delete original polyline } END; END; { ConvertIt } -
I have a need to replace multiple polylines within the front and left symbol components, with polygons in hundreds of symbols. I can do this quite easily using ConvertToPolygon(), however I need the stacking order to be maintained so that the polygon is in the same stacking position as the polyline it replaces. The symbols have polylines at the root level of the component groups, but there are also groups that contain polylines so things get complicated. I am looking for some ideas on how I might be able to do my poly replacement while maintaining the stacking order. Wondering if there is any way to replace one handle with another to achieve this? I suspect the answer is going to be to build an array within each container (component group or group), look at the array number of the polyline, replace it, then use HMoveBackward() to put the new poly back to where the original one was. Any better ideas? Thanks!
-
Windoor - Vertical Bi-Fold Door aka "Hangar Door"
Julian_Carr replied to Mark Aceto's topic in Architecture
@Mark AcetoWinDoor has 4 different styles of overhead doors - some with multiple variations. It was just too much work to have them opening in 3D. With either the Door or WinDoor objects, you could cannibalise (ungroup) a unit that had bifold doors of the correct size and configuration, extract just the door geometry, rotate it 90°, convert to a symbol then replace the actual door with that. About a 5 minute exercise. This video describes the concept in WinDoor at least. -
How to spot Round Walls in VW 2022+ (all scripts broken)
Julian_Carr replied to _c_'s topic in Vectorscript
Script? Procedure WSGetWallType; VAR s1 : STRING; BEGIN CASE GetWallPathType(WSScript_GetObject) OF 0: s1 := 'Straight'; 1: s1 := 'Round'; END; WSScript_SetResStr(s1); END; Run(WSGetWallType); -
How to spot Round Walls in VW 2022+ (all scripts broken)
Julian_Carr replied to _c_'s topic in Vectorscript
Use GetWallPathType(): https://developer.vectorworks.net/index.php/VS:GetWallPathType -
Get Handle to Viewport from Object in Annotation Group
Julian_Carr replied to Julian_Carr's topic in Vectorscript
Thanks Pat. I knew it must be there somewhere. -
I need to get a handle to a viewport, given an object within the viewport's annotation. I thought it would be easy. Using GetParent() on the object in the annotation, returns a handle to the annotation group (type = 11). Using GetParent() on that group returns a nill handle. I feel like I'm missing something?