Jump to content

twk

Member
  • Posts

    877
  • Joined

  • Last visited

Everything posted by twk

  1. Wondering if/when Tapatalk functionality will be added?
  2. 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 : https://docs.python.org/2.0/ref/strings.html 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
  3. 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
  4. Confirming same behaviour here. Has this been flagged as a known issue @JimW? (VW_Architect_SP2_ANZ)
  5. twk

    Marionette Pool

    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
  6. 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!
  7. hmm, strange, full path name worked.. just got my seperators wrong, should've used forward slashes(/) instead of backslashes (\)
  8. 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, https://forum.vectorworks.net/index.php?/topic/41757-2014-script-will-not-run-in-2015/&do=findComment&comment=209508 @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
  9. Interesting @JBenghiat.. I never knew of the SetDownDialogC. What is that normally used for? or How would you use that? Thanks Tui
  10. 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 : http://developer.vectorworks.net/index.php/VS: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
  11. Sketchup > Add Location > Slice Imported Terrain @ desired intervals (1m?) > save as .skp > import into VW > explode mesh > use contours to generate DTM > texture DTM Will try and post screenshots later.. on phone at the moment.
  12. +10000 for this too.. Also @Dieter @ DWorks has been actively developing a similar thing like this for Python. Found below on BitBucket: https://bitbucket.org/dieterdworks/vw-dlibrary/src/f83e15c600a4?at=master https://forum.vectorworks.net/index.php?/topic/45527-dlibrary-a-python-library-to-create-plugins-faster-and-with-more-ease/ .. Great feedback from ComputerWorks.. yes a sneak peak as to what they have planned would be great. Something like what VrayForC4D does with their development via a roadmap: http://www.vrayforc4d.net/v-rayforc4d-3-4-released/ (scroll right to the bottom for upcoming features). As this would help current/potential developers see whats coming up, what they need to concentrate on etc. @JimWany confirmation from VW North America?
  13. Do you need tutorial-type assistance or tips? Site models can be created in many different ways. If time is not an issue, a quick read through the VW2017 help documentation will set you on the right track. In brief there are 2 main ways. 1. Using 3D Polygons that represent contours, you set their relative levels per contour 2. Using 3D Loci's that represent points on the ground and has ground level data (using 3D Loci's set the Z Value to Ground Levels) using either method you select the newly created objects and then run the Create Site Model command from AEC > Terrain > Create Site Model HTH Tui
  14. Use stake objects, and set their Z Value to whats shown on your PDF. Once all points are placed, select all and run the command AEC > Terrain > Create Site Model
  15. This is a great example of Marionette capabilities..! Haven't gone through the network setup, but from the demo vid, it sure is amazing. Thanks for the share!
  16. Thanks @MullinRJ.. Unfortunately, I can't go down this route as I'm iterating through handles to walls that are on different layers throughout the file (in this case, a Project Sharing File), and I don't have exclusive access to each layer (5 floor plans across three towers = 15 floor plans). It's not really feasible to have checked out each layer every time I need to call this function for wall take offs (name wall, get info, delete name). However the getPrefs from the Dev Wiki suite my needs perfectly: list_areas_gross = [] list_areas_net = [] for x in list_walls: gross = vs.GetObjectVariableReal(x,608) #left side of wall net = vs.GetObjectVariableReal(x,611) # left side of wall list_areas_gross.append(gross) list_areas_net.append(net) total = sum(list_areas_gross) #etc, etc
  17. Well I'll be, it's all in the Appendix!
  18. So I was trying to get wall areas through the vectorscript/python module, but I can't seem to crack it. The available calls we're given are: WallArea_Gross (criteria based) WallArea_Net (criteria based) GetComponentNetArea I have a list of walls, and I'm wanting to iterate through each wall in this list and retrieve it's wall area. I'm not using the worksheets because I'm writing these values directly to a csv file. And I've had to write separate functions to loop through(look into) Design Layer Viewports (which VW can't filter for in worksheets) to get handles to walls in layers visible in those layers. So simply, how would I run those criteria based functions above, through a list of handles to a wall. eg. crit = "(T=WALL) & (HANDLE=h)" <-- ??????? areas = [] for x in list_walls: a = vs.WallArea_Gross(crit) areas.append(a) Thanks in advance!
  19. Yes will, that is the current (undersired) work-around. Cheers
  20. Good stuff vectorworks.. I wonder how the VW usability would be with one of these: https://www.youtube.com/watch?v=BzMLA8YIgG0
  21. Thanks @JBenghiat.. will submit bug and hopefully get this sorted out. One of the final steps to releasing some plugins for beta testing
  22. Yes would be handy, there's a substring function for worksheets I've seen, but never gotten to work. Needs more testing
  23. If you had the .pat file, and a copy of AutoCad, you could open a new file in AutoCad, apply that .pat hatch to some dummy object (rectangle,circle) etc. Save as DWG and then import this saved DWG into VW
  24. Hi Josh, We normally using the '__RevNo' field for current revisions, not the '__CurrentRevision' one. Cheers
×
×
  • Create New...