COMJAX Posted March 7, 2008 Share Posted March 7, 2008 I've got 47 worksheets in my current drawing. (Each record has its' own WS.) But I've found that the only way to place them in the drawing is by opening my Resource browser and double clicking on each and every one. Then they're stacked atop each other. :crazy: Highlighting them all and right clicking doesn't work. Highlighting them all and dragging them onto screen doesn't work, only one is placed. Is there a script or something for this? -------------- Also a WISH LIST item while I'm on this subject. It would be nice to be able TO CLICK ON THE RECORD go directly to creating a WS for that record. AJ Quote Link to comment
Vectorworks, Inc Employee Hugues Posted March 13, 2008 Vectorworks, Inc Employee Share Posted March 13, 2008 Are you familiar with VectorScript ? You can use the CreateWSImage() to place a worksheet in the drawing. This is a script for you. PROCEDURE PlaceWSInDrawing; VAR listID: LONGINT; { List ID for worksheet resources } listCount,index: LONGINT; hWS: HANDLE; hImage: HANDLE; x,y: REAL; { worksheet image position } BEGIN {procedure begin} listID := BuildResourceList(18, 0, '', listCount); IF listCount > 0 THEN BEGIN x := 0; y := 0; FOR index := 1 TO listCount DO BEGIN hWS := GetResourceFromList(listID, index); IF ((hWS<>NIL) & (GetType(hWS) = 18)) THEN BEGIN hImage := CreateWSImage(hWS, x,y); ResetObject(hImage); x := x+1; y := y-1; END; END; END; END; RUN(PlaceWSInDrawing); Hugues NNA Quote Link to comment
COMJAX Posted March 14, 2008 Author Share Posted March 14, 2008 Thanks but I don't know anything about using or creating a VS. What do I do with what you posted? I copied and pasted in into a new VS but nothing happens when I run it. Quote Link to comment
COMJAX Posted March 14, 2008 Author Share Posted March 14, 2008 Never mind, it works. I tried running it in a drawing that already had WS and didn't notice it was reordering them cause I was on another sheet. Thanks a bunch, this will save me tons of time. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.