Jump to content

DomC

Member
  • Content Count

    404
  • Joined

  • Last visited

Everything posted by DomC

  1. An example for an custom marionette node, using controll geometry. Collects symbols out of a symbol folder and place them into the controll geometry path. Supports randomness for offset of the base grid, density, and angle variation. Nice for crowd, trees, forest etc. Have fun! RandomSymbolinArea_(1).vwx RandomSymbolinArea_3D.vwx RandomSymbolinArea_v02.vwx SymAreaMarionetteTest.vwx
  2. Version 1.0.1

    258 downloads

    This Nodes breaks up and scale a 3D Solid Geometry and the result is similar like a 2D Geometry reshaped by the 2D Reshape Tool. The Input Geometry (Geometries) have to be grouped. You can input it from symbol or control geometry. The Node is designed with some love to detail and make the job in many situation just right. It follows some rules: 1. reference Point is left bottom back 2. Overlapping geometries over the zero point to left, back or bottom are handled symmetric. You can use locus points to direct the correct symmetry. 3. The nodes cut a geometry in 3 parts. the end parts are called "caps". The Node allows to scale the caps or the middle part (in most cases the right mode) 4. It is necessary the input geometry is a group. 5. Grouped Objects completely inside caps, will be moved as well 6. Objects between the caps, will be moved half value This advantage of this node, is to allow an incredible fast production of a specific type of PlugIn Objects (Reshape in x, y, z direction Middle Part is scaled like Tables, Pillars, Handles etc.) Movies: Simple Example (Pillar): https://youtu.be/F6BIe8d0mTs More Complex Example(Window Element): https://youtu.be/pJ9R8UWyM7Y Further Examples: https://youtu.be/uRwDU-KTRjw
  3. DomC

    Automated Layout

    Version 1.0.2

    92 downloads

    Hi This Examples shows, how to automatically create sheet layers and viewports from objects of the design layers. In this example, a sheet layer will be created for every exhibition place available on the design layer. It creates a 1:20 close-up from the specific exhibitor's place and an overview plan with a marker of the exhibitors place. This Network-Template could be used whenever you want to create automatically documentations out of your drawing. As Example: - Put a Viewport of every Space Object in your drawing on SheetLayers - Put Viewports from Building Elements close-ups (Windows, Doors etc.) on sheet layers Also this Network contains some very powerful custom nodes: 1. Enhances BBox, Enhanced Rectangle, PutByRefPoint those are just to save time for calculating width, length and ref point of objects 2. Function Two (like standard function node with two inputs), SetParent (1. and 2. Already available on this forum) 3. CreateLayer 4. CreateViewport 5. VP Layer Visibility 6. Add VP Ann (Annotations in Viewport) 7. Nodes for getting Marionette OIP Data which is not possible with "Get Record Field"
  4. DomC

    Automated Layout

    @Luisa I am back from vacation so sorry for late reply. Basically this Example do the following: 1. Collect Objects in the drawing with the criteria node 2. Read some informations of the objects and put them together with a viewport on different sheet layers. 3. additionally it creates a title block with some informations about the object You can do this for all objects independent if they have a record or not. It is just an example. Because it is a Marionette feature you could enhance or change, what the script should do (Maybe group all spaces from one layer on the same sheet layer, maybe collect additionally informations from objects which are in the space or on bound of the space, etc. etc.) To your question: All spaces are already linked to a record format (Datenbank). Specific the Example with the spaces, uses the room Number for naming the sheet layers. Also it reads data for write them to the title block. If your spaces have not the informations as the script excepts (No Room Number, No Name etc.) it maybe will not run. So if your spaces and informations are not the same type as in this example the script has to be fit to your space informations. You could share some of your spaces, that would help understanding if an issue appears
  5. DomC

    Basic Reshape SolidScale in x,y,z

    Hi Pier The Node used the outdated vs.GetType() command which do not work in 2019 and also produced wrong handles in 2018. New Versions uploaded. I fixed this long time ago but forgot to update this here in the forum. Beside that, this node is in use in several real live projects (as Example the fassade (Window Elements with additional frame and all ifc informations) below is made with this)
  6. The attached Marionette example shows, how to renames resources from the active document. It contains several custom nodes: 1. "TypePopup" : An Input Node, which translate a readable popup (Line, Rectangle, ImageFill etc. ) in the internal used index number (VectorScript appendix) 2. "GetRes" : This Nodes, collects the specified resource type from the active document. 3. "ReplaceString" : This node, replace any part of a string (text) input with a new string This example could be used for sorting and organize mass of ressources. - Find/Replace Text (or Characters) in the resourceName - add prefix or suffix to the name (As example .sym to symbols to clear names or prefix with the building number etc.) - produce an index number to a name for sorting - etc. RenameResources.mp4 RenameResouces.vwx
  7. The Question seems not to be very common (I was not able to find something similar in the script forum). The Attached Scripts converts the selected symbols to groups and attach the colors of the symbol to that group. Made to fix some incompatibility with DWG Block Colors. Maybe some one else can use it. The Attached File contains two Scripts 01 > attaches class colors, 02 > attaches colors from the attribute palette. Symbol to Group Attributes.vwx Symbols2GroupColors.mp4
  8. DomC

    Counter for DoorID

    Hi I am not sure, if I unterstand it right: 1. If you have a door from room_1 to room_2 you want to have 1_1_2 2. If you have a second door from room_1 to room_x you want to have 1_2_x If you want this, it will in my opinion make something you maybe not want to have. Because room_1 and room_2 values follow the stacking order. Or if you just count unique ID same room-room pair (which normally will counts one if not two doors connects the same room pair ) As Example you have 100 doors from hallway to rooms. It will not automatically count all 100 doors to the hallway position. Did you already solved that point? Ideas: Sort by room number etc. to get a reproducable order. Also we could solve that if you get the wall direction of the parent wall of the door and look the banding of the door. So you could see, in which room the door opens. If you have a door without opening, it will be hard to deside, from which room you get to another room. You have to build a complexe network of room-room connection which sort parent room (defined somehow by entrances etc. -could be very complexe(impossible for us) I think) and child room. Or you just get the door opening circle or another indicator and check if this is in another room By the way back to your counter: You don't store x, y, and number in a global list and reset them to zero every new door in your door iteration. So it is hard to check which ID are already used by another door. Don't would think about this till the first point is not clarified.
  9. This Marionette network uses a custom node, which implemented the pixel-based try and error code (I think there is no other way to create voronoi, is it?) from here https://en.wikipedia.org/wiki/Rosetta_Code Instead of Pixels it uses rectangles which were extruded in random height (ground height is different in every voronoi cell). And different full spectrum random colours (which would look much better with adapted colour design). Carefull playing around with values. Do not enter to high or to low values. Creating 843'135'013 extrudes, could take a while :-) VoronoiTest.vwx
  10. DomC

    Workgroup folder

    Hi As far as I know on Windows it is stored in the Registry in Current User and on Mac in the User/Library/Preferences. I am not sure if this works in your situation. With python I think it is easier to get access to the system files. Maybe this also would work with a pascal script ... Windows: from winreg import * aReg = ConnectRegistry(None,HKEY_CURRENT_USER) aKey = OpenKey(aReg, r"Software\Nemetschek\Vectorworks 24\General") WGF_Path = QueryValueEx(aKey, "Workgroup Folder 0") #vs.Message(WGF_Path[0]) target = WGF_Path[0] Macintosh: import plistlib MacFile = 'Users/userName/Library/Preferences/net.nemetschek.vectorworks.2019.plist' pl = {} with open(MacFile, 'rb') as fp: pl = plistlib.load(fp) vs.AlrtDialog(str(pl.get("NNA Workgroup Folders"))) vs.AlrtDialog(pl["NNA Workgroup Folders"]) I needed this for a quick and dirty job. For sure it could be enhanced as Example by not using a fix path for the user Name: import getpass var_username = getpass.getuser()
  11. Version 1.0.1

    114 downloads

    This Marionette Script creates multiple space objects from worksheet data. A very nice and time saving Marionette script to automate a routine peace of work. Please consider, that the the script takes the area column and calculate the square with that. If you have a language settings with comma instead of points for decimal seperator, the calculation will fail. Use points as decimal character or eliminate decimal places in your list
  12. DomC

    SpacesfromList.vwx

    @Boh Uploaded a fixed v2018 example similar as the 2019 Version. It does not use the input wrapper. Instead of that it uses a red symbol from a space object.
  13. Hi Imagine you have client, which delivers you a room list. And a list, which objects have to be in this rooms. You can consider this lists with hundreds of rooms on your left screen and click them one by one in your rooms. You will make errors and your eyes will get squared. Another real interesting example how you could accelerate a routine job with a marionette script. Look here: P.S Sometimes I remember the good old times I turned on the radio-volume and drawed hatches with single lines one by one.
  14. @tismacfan2 Hi Think you should edit the "Get Record Field" node and paste the content of the 2019 "Get Record Field Node". Specific the vs.GetType(h) function should be replaced with vs.GetTypeN(). That issue hits every Marionette Script which were using SetRecordField and GetRecordField. Attached an Updated File Best Regards Dominique Symbol on Space v2019.vwx
  15. DomC

    Apartment Area

    Version 1.2.1

    57 downloads

    This nice script summarize all Space-Areas, which are part of the same Appartement Number and shows the result in a symbol based stamp. Alternatively you can get apartment. Alternatively we can pull out sum of apartment area with a worksheet. But this Marionette is also a nice method to do this. Instructions: 1. The Marionette Objects access to the field "11_Room ID" of the space object. Every other field can be used if necessary by editing script 2. with the Marionette PIOs field "Raum ID" you can tell the stamp, which apartment should be displayed. Apartment Area v1.2.1 v2019.vwx
  16. Version 1.0.0

    17 downloads

    A Marionette PlugIn, that collects a custom drawing (font character, picture whatever) and refer it to a regular font character. This "Font" is placed into the control geometry container. Also we could just use a blue symbol. The Heart of the script is a custom node "create font dict" which manage collecting the control geometry. Also it returns a dictionary sequence data type. A dictionary is very useful if you want to have pairs of data. In this case a character and a drawing group with informations forms a pair. Sure, the script could be improved by several things (multi-line, alignment, page based etc. ) But I think it is very useful to have that plug in. Have fun with it. Maybe you can share your own fonts and your wonderful handwriting here. Thanks. Usecases: 1. Handwriting Font 2. Vectorfont (ability to use sketch view) 3. For Milling Machines 4. Fast inserting of object sequences 5. ... Update v2019 1. Script Crashed if input Geometry was None (Integrated a script blocker and an Alert Dialog ) 2. Input Dict was always None, because use of an outdated Script command (vs.GetType() instead vs.GetTypeN()). Issue in many other scripts. One of the very rare incompatibilites of Script commands the past Years.
  17. DomC

    Script for Automatic filling of fields

    There is a Script on the "VSSM Vorgabe.sta" which changes Title Blocks from an external File. If you create your vwx in an external software you can attach a txt which contains this data. With the same system, you can attach data for other PlugIns (like the cabinet you use). So you maybe define your cabinet in the external software, then click there on a button which creates the vwx (from different templates maybe) which contains your cabinet. Then Double click the script and set the dimensions of your cabinet to the exported values. Can save some seconds for your drawing. Seems like this is the kind of script you want to have. Not have much time for this (I think after a answer of your initial question you would like to create more than one cabinet per file or maybe want to attach other kind of date (which is not part of the Object Info Palette and which we maybe can change or maybe not like Position Number and stuff like this ). Maybe you could use Layer Name for position Numbers and export the layer name with a custom cutting list export configuration. I can give you a start with the following script (Filename.vwx and Filename.txt in the same Folder) then the Columns "Breite", "Hoehe", "Tiefe" which are translated to a dictionary you can easy call in the script. This Example will change the first object in the Layer (which maybe not suffice but it is just an example not a solution). The better you can descripe any details and specifications and post examples and previous work the better you will get answers from the community. If you invest some of your time you maybe are able to change some part of a relatively simple script like this. pathVWFile = vs.GetFPathName() path = pathVWFile[:-3]+'txt' skipHeader = False asString = True delimiter = "\t" codex = 'iso8859_2'#'latin_1', 'iso8859_2', 'mac_latin2','utf_8' lines = [] rows = [] import csv import os if asString==False: quote = csv.QUOTE_NONNUMERIC else: quote = csv.QUOTE_NONE if os.path.isfile(path) == False: vs.AlrtDialog('Importdatei wurde nicht gefunden') #vs.AlrtDialog(path) rowNum = 10 lineNum = 10 if os.path.isfile(path) ==True: with open(path, encoding=codex) as f: reader= csv.reader(f,dialect='excel',delimiter=delimiter,quoting=quote) if skipHeader==True: next(reader) for line in reader: lines.append(line) lineNum = len(lines) rowNum = len(line) for row in range(rowNum): rown = [] for line in range(lineNum): rown.append(lines[line][row]) rows.append(rown) if asString == False: rows = tuple(tuple(x) for x in rows) rows = list(rows) lines = tuple(tuple(x) for x in lines) lines = list(lines) erpdict = dict(zip(lines[0], lines[1])) h = vs.FActLayer() Record = 'XG Cabinet' #vs.AlrtDialog(str(erpdict)) vs.SetRField(h, Record, 'Width', erpdict.get('Breite')) vs.SetRField(h, Record, 'Height', erpdict.get('Hoehe')) vs.SetRField(h, Record, 'Depth', erpdict.get('Tiefe')) vs.ResetObject(h) PIO Parameter by external File.mp4 KorpusmöbelExterneDatenquelle.zip
  18. DomC

    Script for Automatic filling of fields

    Hi Urs The short Answer: Sure, this is possible but maybe not possible for a first scripting exercise. You can load data from a Textfile and you can attach Data to a PlugIn Object. I also pretty sure this question was asked for another plugIn (PlugIn is PlugIn A window and a cabinet makes not difference) before in the forum. Where to start: - What is the exact result you want to have. You want to create as example 1000 PIOs as Symbols from an external file? - Do you want to read a textfile and attach the values to a PlugIn Object in the drawing? Why you want to do this? - Do you know the Vectorworks Data Sheet? You could list your PluIns and change values in the Data Sheet or paste it from external list. So the start would be to know exactly what the final result should be and which workflow now seems not fast enough to invest time in a script. Similar Projects: Maybe take a look in the Marionette Corner. If you want a textScript, you can learn from the code inside the nodes, it is the same. 1. Import a text File: https://forum.vectorworks.net/index.php?/files/file/116-create-record-from-external-file/ 2. How to create PlugIns from such a list https://forum.vectorworks.net/index.php?/files/file/81-spacesfromlistvwx/ 3. Create a Symbol https://forum.vectorworks.net/index.php?/files/file/120-create-symbol/
  19. DomC

    SpacesfromList.vwx

    @Diamond Same Issue like in many other Scripts which uses the SetRecordField Node. I fixes that (Replaced SetRecordField with the ne 2019 Node)
  20. DomC

    Automated Layout

    Hi Onyx It is everything possible, what we can also solve with Vectorworks functions. The Question here is, how to make views from a single furniture and hide all others. The standard workflow I recommend here is, to draw every single position on different layers. So we are able to work on every furniture/position undisturbed from the rest of the drawing. Also we can rotate them in a front view to work on it. Then make Design layer viewports from this furniture and assemble it on a master view. That's the way I would structure it. From your structure it maybe could be solved as following: 1. Different classes for every furniture. Maybe automated class-naming with the position descreption or furniture name and then Automated layout with class visibility. Or 2. Sections around the furniture. But I am missing my KnowHow how to make sections with a script and also the issue is, that the sections will cut the furniture which is beside the required furniture. So #1 or a better Idea could be a base for a Marionette automation.
  21. DomC

    Rectangle Packing

    @Gescher Hallo Ich kann mir das gerne anschauen. Es gibt zwei Tabellen-Inputs. Einerseits die Teileliste, andererseits eine Plattenliste um für verschiedene Materialien, verschiedene Plattengrössen zu definieren und um zu sehen, welche Platten bestellt werden müssen. Wobei man auch bei der Lager-Liste Stk 1 verwenden darf, wenn man das nicht braucht. Also Board-List ist der Platten-Lagerbestand und Stückliste-Küche ist die Stückliste. Es könnte dann Fehler geben, wenn die Spaltenreihenfolge nicht stimmt, die Zahlen mit Komma getrennt sind (7,1 statt 7.0). Poste doch mal Deine Beispieldatei und Beispieltabelle.
  22. Version 1.0.0

    368 downloads

    The heart of this Marionette example is the RectPack node. A node with over 2600 lines of code! It supports dozens of packing algorithm to pack rectangles on another rectangular area in a space and time-saving way. The right combination of packing and bin algo gives the ability to pack rectangles in a way you want to have them on your machines (as close as possible, always cut complete board, less cuts etc.) Actually not even myself know, which packing algo ist right for which use case. Also for professional use case, usually there is a machine dedicated software, which packs the port in a way which match best for the machine. So I see the main use case to pack parts on a board for milling them on a cnc-machine as example for model-making. Workflows which uses a guillotine-workflow (always cut the whole board) often have special requirements which maybe could be reached with the choice of packing algorithm or maybe can not. The Marionette Example based on foundational work: http://www.secnot.com/ Python code for packing algorithm Jukka Jylang - A Thousand Ways to Pack the Bin - A Practical Approach to Two-Dimensional Rectangle Bin Packing (2010) Huang, E. Korf - Optimal Rectangle Packing: An Absolute Placement Approach (2013) General Features: - Input of basic data like length and width - Input of additional data - object input (node detects if part input are objects and process them like rectangles) - sort by material - use a list of stock materials .... Not all input combinations works at the moment. Recommended to use the existing examples to get correct input values.
  23. DomC

    Reshape Node 2D

    Version 0.9.4

    80 downloads

    https://youtu.be/vuCvK4OwN80 German Movie https://youtu.be/Nm0te1zmpVY English Movie Structure of the Input: 1. Group with Geometry group (send to back) and Reshape Zone definition (send to front). Best practice is to use a blue smbol without screen plane objects 2. Reshape Zone group has further groups. Every reshape zones (polygons) is grouped with a dimension object. The dimension is the link to the script. The parameter name is a prefix of the dimension text 3. Use one of the existing examples to understand the system Limitations: 1. Supportes not 3D, Chain Dimension, path objects, rectangles. Container objects are not reshaped but moved (like the reshape tool) 2. user origin has to be set to vectorworks origin 3. not mix of screen-plane and layer plane. Use all layer-plane 4. ... Parametric Symbol v2018.vwx
  24. DomC

    Reshape Node 2D

    Another example usecase of parametriced drawers.
  25. Version 0.9.6

    39 downloads

    This Network ist not very flexible (world based values, just one row) but still useful. You can insert and and ungroup for individual layout etc.

 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×