Jump to content

DomC

Member
  • Content Count

    411
  • Joined

  • Last visited

Community Reputation

242 Spectacular

About DomC

  • Rank
    Journeyman

Personal Information

  • Location
    Switzerland

Recent Profile Visitors

3,935 profile views
  1. Version 1.0.0

    6 downloads

    Importer Nodes for the most used external python packages. Tested with VW 2020 SP1, Mojave 10.14.6 and Windows 10
  2. Hi This thread is a little older. I just had to install pandas and it worked with the following script (VW 2020). Not tested on Windows. Newer Versions of pandas maybe possible but some of them requires python 3.5.3 and we have 3.5.2 embedded in Vectorworks import sys import Marionette import platform import os Usr = vs.GetFolderPath(-12) (major, minor, maintenance, platform, buildNum) = vs.GetVersionEx() if platform == 1: Path = Usr + 'temp/tempImg.png' else: Path = Usr + 'temp\\tempImg.png' vs.AlrtDialog(str(sys.version)) if platform == 2: pandas = 'https://files.pythonhosted.org/packages/9f/df/6718044777d8a76532cb219a7604606e784bf630fe724a3fec2000ce31b1/pandas-0.21.0-cp35-cp35m-win_amd64.whl' else: pandas = 'https://files.pythonhosted.org/packages/69/c2/0323c5bdb0d0b8b9e07dc96e81fb13155784a4b2d5cb1feaa110261e5ae3/pandas-0.21.0-cp35-cp35m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl' if Marionette.VerifyOrGetLib('pandas', pandas): pass else: vs.AlrtDialog('Modul pandas ist bereits installiert')
  3. You can try it out manually. Just Make a Symbol of your contour and make a blue symbol (In Gruppe umwandeln) in the Symbol settings. Then insert your symbol. As you can see, your contour it is a single object. The same behaviour as if you insert it in a marionette script. A good start to make a script is to have a definition of parameters and some example drawings. Also always try to find out if it is already part of standard-functionality . So you or anybody else is able to see, how complexe or simple your Programm will be. For most project you should calculate 4-5 days if you start from scratch. Maybe there is something similar already there (I remember a Frame example here, which also used symbols as a profile for path objects)
  4. We are talking about BLUE symbols, with the symbol setting "insert as group"? Or red symbols, which are containing a PIO. As Pat mentioned, a single object (polyline as example) will be inserted as a single object. Multiple Objects as a group. The Croup content you can reach easily with the Marionette Content Node. Split them with the List Explode Node.
  5. @Dod Definitely the ConvertToGroup Node converts the input to a group but there is no output (this node is junk, sorry :-). I think there is no easy and quick solution right now. I would strongly recommend using blue symbols for that what you want to do with the symbol. You can activate and rightclick all symbols in the resource browser and then "Symboleinstellungen bearbeiten" > "in Gruppe umwandeln".
  6. @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
  7. 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)
  8. 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
  9. 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.
  10. 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. @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.
  12. @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
  13. 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.

 

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.

×
×
  • Create New...