• Content count

  • Joined

  • Last visited

Community Reputation

24 Great


About twk

  • Rank

Personal Information

  • Occupation
    Architectural Draftsman
  • Homepage
  • Location
    Auckland, New Zealand

Recent Profile Visitors

446 profile views
  1. Please UpVote this on the wishlist post below!
  2. This is great.. thanks VW Team.. now looking forward to that script sharing section with similar screenshots..etc.. future is less dim now
  3. I take it that smile means: "I'm going to spill the beans right away! "
  4. Wondering if/when Tapatalk functionality will be added?
  5. I think it goes a bit like this: Marionette, is built on the python language. Meaning all syntax for writing marionette needs to adhere to python syntax(code structure/rules). With regards to the 'back-slash' issue, thats to do with the way python handles strings. read more here : As to whether Marionette was built with a programmer mentality in mind is up to debate. As the actual description states that it is a visual-scripting-language. Which to me sounds that, if you're going to embark on using it, you'll need to think in terms of building computer code, which in my opinion is very similar to physical building construction methods, the transition could be relatively easy. On a side note Alan, you're probably the best go-to-guy for all things Marionette! Keep on keeping on! HTH Tui
  6. Haha, ok don't jinx it! I shall check back in 1 month.. hows that for a deadline?..haha
  7. Hi Everyone, Maybe this needs to be placed in another sub-forum? (Upcoming Features/RoadMap). Just bumping this thread to find out any other news on this release? @JimW
  8. Confirming same behaviour here. Has this been flagged as a known issue @JimW? (VW_Architect_SP2_ANZ)
  9. Hey Josh, I believe you had a 'handle' type point to an 'int' for one of the subtractions. Below is an adjusted version. Descriptions in the Marionette Script area. A good way to start a Monday! Pool_tui.vwx
  10. Awesome @orso b. schmid! We currently have the workgroup folder shared on the network with all the libraries there.. Vectorworks starts really slow.. will test your setup and post back results when I can. Also @JimW.. this should be stickied!
  11. hmm, strange, full path name worked.. just got my seperators wrong, should've used forward slashes(/) instead of backslashes (\)
  12. Greetings all, I'm trying to wrap my head around, showing an image in dialogue. I see this function call: def vs.CreateImageControl2(dialogID, controlID, widthInPixels, heightInPixels, imageSpecifier): return None ..but can't get it to work. The issue is with the 'imageSpecifier' parameter. Looking at other posts, @klinzey instructed the use of a folder named _some_name.vwr, with your image in there, and use that path for the imageSpecifier. However, what if you want your image structured down the folder channel the same way your plugins are structured. Eg AppData |-- Roaming |---- Nemetscheck |------ Vectorworks |-------- 2016 |---------- Plugins |------------ TuiPlugins |-------------- PluginImages |----------------| rectange.png |-------------- Rectangle.vso full_image_path = "TuiPlugins\PluginImages\rectangle.png" def CreateDialog(): -- vs.CreateResizableLayout(etc,etc..) -- vs.CreatePullDownMenu(etc,etc..) -- vs.CreateEditText(etc,etc..) -- vs.CreateImageControl2(dialog, k_image , 200, 200, "{}".format(full_image_path)) can this be done? Or does the folder have to have the .vwr characters appended to it? And can the location of this *.vwr folder be placed further down? Hope this makes sense
  13. Interesting @JBenghiat.. I never knew of the SetDownDialogC. What is that normally used for? or How would you use that? Thanks Tui
  14. I've tabbed the code to make it easier to read: Procedure DialogTest; TYPE U_RECT = STRUCTURE a: REAL; b: REAL; END; VAR gRectObj: U_RECT; FUNCTION SetUpDialog(rectObj: U_RECT): LONGINT; VAR ID: LONGINT; BEGIN ID:= CreateLayout('Rect Dimensions',TRUE,'OK','Cancel'); {Text fields} CreateStaticText( ID, 05, 'Value-a', 15); CreateStaticText( ID, 06, 'Value-b', 15); {Box fields} CreateEditReal( ID, 15, 1, rectObj.a, 10); CreateEditReal( ID, 16, 1, rectObj.b, 10); {Text layout} SetFirstLayoutItem( ID, 05); SetBelowItem( ID, 05, 06, 0, 0); {Box layout} SetRightItem( ID, 05, 15, 0, 0); SetRightItem( ID, 06, 16, 0, 0); SetHelpText(ID, 1,'Click to accept values'); SetHelpText(ID, 2,'Click to cancel operation'); SetHelpText(ID, 15,'Enter width'); SetHelpText(ID, 16,'Enter height'); SetUpDialog:= ID; END; FUNCTION GetRect(VAR rectObj: U_RECT): BOOLEAN; VAR a,b: REAL; ID,dlogResult: LONGINT; PROCEDURE DriveDialog(VAR item:LONGINT; data:LONGINT); VAR i,choiceNo: INTEGER; foundName: BOOLEAN; BEGIN CASE item OF SetupDialogC: BEGIN END; 1: {OK} BEGIN IF GetEditReal(ID,15,1,a) THEN rectObj.a:= a; IF GetEditReal(ID,16,1,b) THEN rectObj.b:= b; END; 2: {Cancel} BEGIN END; END; END; BEGIN GetRect:= FALSE; ID:= SetUpDialog(rectObj); IF VerifyLayout(ID) THEN BEGIN dlogResult:= RunLayoutDialog(ID,DriveDialog); IF dlogResult = 1 THEN GetRect:= TRUE; END ELSE AlrtDialog('Cannot create the dialog'); END; BEGIN gRectObj.a:= 1.25; gRectObj.b:= 2.64; IF GetRect(gRectObj) THEN BEGIN Rect(0,0,gRectObj.a,gRectObj.b); END; END; Run(DialogTest); (1) 'gRectObj' is a user-defined variable type. Declared a couple lines up: TYPE U_RECT = STRUCTURE a: REAL; b: REAL; END; (2) The GetEditReal(ID,15,1,a) and GetEditReal(ID,16,1,b) calls are retrieving data from the dialog item (15, 16), storing each in 'a' and 'b' respectively. and the "IF" statement in those lines are basically saying, if there is a real number stored in those dialog items, store them in as the rectObj.a, and rectObj.b variables. As you can see the custom/user defined variable U_RECT has two components to it a,b. So rectObj is a U_RECT type of variable, having these two components. More info on GetEditReal : (3) BEGIN GetRect:= FALSE; ID:= SetUpDialog(rectObj); IF VerifyLayout(ID) THEN BEGIN dlogResult:= RunLayoutDialog(ID,DriveDialog); IF dlogResult = 1 THEN GetRect:= TRUE; END ELSE AlrtDialog('Cannot create the dialog'); END; This is the main code of the FUNCTION > GetRect(VAR rectObj: U_RECT): BOOLEAN (4) IF GetRect(gRectObj) THEN BEGIN Rect(0,0,gRectObj.a,gRectObj.b); END; This is basically saying if the function GetRect returns TRUE then draw the rectangle. Hope this helps Tui