Jump to content

DomC

Member
  • Content Count

    398
  • Joined

  • Last visited

Community Reputation

205 Spectacular

About DomC

  • Rank
    Journeyman

Personal Information

  • Location
    Switzerland

Recent Profile Visitors

3,397 profile views
  1. @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
  2. Version 1.0.0

    6 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.
  3. 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
  4. 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/
  5. 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)
  6. 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.
  7. 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.
  8. DomC

    Reshape Node 2D

    Another example usecase of parametriced drawers.
  9. DomC

    Error loading Vision Library

    Post removed: (Wrong Thread, sorry)
  10. DomC

    Converting Strings to Numbers

    Hi Generally this are common issues: 1. If you have a String of 0.30000 and want to have have a string output from 0.30 you can youse x[:4]. The first 4 character of the string. If you have 100.45987 you will get 100. with this formula. If you use x[:-2] the last two characters are lost. To Prevent this, you could first split the string in number and digit and then operate with this. 2. Sometimes there are Units like m2 mm m qm etc. 3. Sometimes we want to have prefix like +. - and +- etc. 4. Sometimes there are , instead . of decimal seperators. The attached Nodes, addresses all of this common issues. Simple issues, but relatively complexe to solve. I attached some node to solve them. The error message you got is because to substract two items from a list (a string is like a list '0', '.', '0', '0' etc. or a list of numbers will be [0,5,3,4.5,]). So with a Number of 0.30000 it will not work, this is just one item. You could convert to string str(x)[:-2]. Then it would work. Do not know what mapping is doing. If it converts the string of 0.3 in a number it Maybe by standard makes again 0.300000 in the IFC Export. You see, not so trivial. I Recommend using the Attached Node Digits from string and try with this. Set Digits From String.vwx
  11. DomC

    Apartment Area

    Hi Pat Thanks for reaction. You are right and I already switched to 11_Area in the 2019 File.
  12. DomC

    Apartment Area

    @Luise It hard to intercept every bug in other components but I think this Update will fix it: 1. Uses 11_Area which seems to be m2 instead of cm2 2. separate numbers from unit and can handle , as dezimal delimiter. 3. Returns 0 for Bottom elevation if elevation is negative (can't fix this, maybe I could by getting the IFC elevation height, but I don't want to) You can try the attached Update File it will work without error Message Apartment Area v1.2.1 v2019.vwx
  13. DomC

    Apartment Area

    Are you testing in 2019? In 2019 space delivers cm2 for area and negative elevations will result in empty output. That will result in issues because the script is not made to deal with empty input. I will look what. Also the "Get Record Field" Node from 2018 will be broken in 2019.
  14. DomC

    Apartment Area

    Hi @Luise An Update is available. Now it eats comma separated numbers together with units.
  15. DomC

    TV All-in-One

    Good and purged script design with a user friendly info-palette. Thanks for sharing.

 

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.

×