Jump to content

Samuel Derenboim

Member
  • Posts

    475
  • Joined

  • Last visited

Posts posted by Samuel Derenboim

  1. HI everyone,

     

    I've come across multiple marionette scripts that use rest api to retrieve json information. The caveat - they use python, that require additional libraries to use the GET function.

    my question - can vectorscript do something similar without additional libraries? I am looking to use an API to extract records from a remote web based json api. As it appears, vw script can open a web browser using the showwebdlg function. I was looking to see if I can pull records from json using vectorscript.

     

    Thank you in advance!! 

     

    here is an example from 

     

    @Marionette.NodeDefinition
    class Params(metaclass = Marionette.OrderedClass):
    #APPEARANCE
        #Name
        this = Marionette.Node( 'Pass' )
        this.SetDescription( 'Do nothing node. It just passes the input to the output: y = x' )

        #Input Ports
        x = Marionette.PortIn( [], 'item' )
        x.SetDescription( "input" )

        #OIP Controls

        #Output Ports
        y = Marionette.PortOut('item')   
        y.SetDescription( "output" )

    #BEHAVIOR
        #this.SetListAbsorb()
        
    def RunNode(self):
        import requests
        
        #script
        api_url = "https://jsonplaceholder.typicode.com/todos/1"
        response = requests.get(api_url)
        vs.Message(str(response.json()))
        x = 0

        #outputs
        self.Params.y.value = x

     

  2.  @shorter , quick question, is uniclassformat linked to a specification system in europe? Much akin to masterformat in america? The reason I ask is because omnivlass table 22 (or 23 ) is basically the copy of the masterformat system translated into BIM. Fun fact, all tables included were also originally created by csi including masterfomat                  

  3. @heikolistische

    Thank you ! Was hoping you could explain how can they be used? is it possible to transfer properties from a custom record to a material record? i.e. if an object has a material attached and has a custom record attached that I wanted to link to each other, could I use the nodes to transfer the information from the record to the material property?

  4. I once used a really ugly method. I used a design layer viewport across multiple stories that referenced one design layer. It worked....sort of. 😂😂

     

    Using this method i was able to copy portions of a design layer as well. So you if have several 'units' on multiple design layers, you can reference them in conjunction with each other on other stories. That way - you modify one - you modify all instances. note however - your schedules will be messed up! they will only count 1 design layer as the remainder are viewports. (unless you can reference them somehow independently of the design layer)

  5. @Pat Stanford

    Sorry for the late reply, I have been experimenting with introducing ODBC remotely, and am sharing it on here. In the interim, Ive discovered what I believe the unifying element between material libraries and a custom record database via ODBC (see below)

     

    Regarding the question as to the solution - i have a few ideas

     

    1. Idea 1 ---- ODBC -> Object with record / texture / hatch -> script -> generate material with name of record or texture (as with original script)

    Note - the records would be a 1 - 1 match with material property records -> all that would need to happen is somehow run the script to match the record format with the material record properties. Would something like this be difficult?

     

    2. Idea 2 ---- import csv / excel -> v-lookup material name with table -> if they match -> copy record per category (also 1:1 match in this case)

     

    3. Idea 3 ---- brute force method - copy and paste 😂😂

     

     

     

     

  6. I believe I just discovered the holy grail of referencing information via remote database. To give you a representation of my workflow, I will make another post to separate it from the initial content.

    One of the major hardships that I have had connecting to a remote database was that the database connection was always lost upon exiting the file. If you worked remotely, this was not acceptable. One of the most common problems that comes up is this : 

    image.png.50788999e9723d388f6a0d9de75f0756.png

     

    However after tinkering around (for weeks) with the object link database, i accidently came across this (see screenshot below).

     

    This pop up only comes up when you press the object database connection when you have multiple selected objects selected. This is VERY VERY IMPORTANT

    Why you ask? because it renews the database connection that you established earlier and it can update the remaining database records when one common record is matched.

    That means - if you have thousands upon thousands or records (which i plan to have), going it through the list when you open object database connection would be a nightmare. Instead, make sure you have a record that exactly matches word for word in the database and use this dialogue to update the remaining records. 

     

    I call this the HOLY GRAIL of ODBC connections because the applications are almost limitless - everything from referencing product information / ids, to materials, to building code references / uses or zoning. I am sure some of you are even more creative than me and will find even more applications. 

     

    Now, if everyone has had the patience to read through this already, I have a question to the employees or anyone a little more familiar with this than me. 

     

    How can the menu below be referenced by a shortcut? and can this particular function be used in a script? the reason I ask is that I plan to use this for assembly details ( i will create a separate post because it involves material libraries as well) and will use tags to reference the information - and updating the database with multiple clicks can be especially frustrating, and would prefer to use a shortcut or some quick method with a script perhaps?

     

    Anyways, I hope you find this information useful. To me it was a huge deal and thought I'd share.

     

    image.png.344d3eeafb7ff1d4b0e2a33f0e039d9d.png

     

    This post is a follow up to my previous post of setting up ODBC. I case it was missed on how to set up ODBC see below

     

    This is the process by which i access my database both locally and remotely. The database can be access via link below : sorry, this is read only. If anyone wants to experiment with this, let me know, i can provide a sample write access version. 

    The link below is the database front end that I use to edit the database. It has its own subdomain, so it can be universally accessed and edited. And then, in turn, vectorworks can access the mysql database on a different port using the same subdomain. Therefore : enter the information via web, access the information via Vectorworks. Need to update the info ? see method above.

     

    https://db.autographarch.com/dashboard/#/nc/view/5cf8b5cb-fbe1-4532-88e7-dc4bed61eb40

     

     

     

    image.png.8b639144bf00b25dcf6a4825df75d82b.png

     

    • Like 1
  7. @Pat Stanford

     

    Its not that at all. I actually use those scripts when i have a texture library to convert from and then modify the records, and its the most streamlined process I have to date to come close to creating a library, and for that I am very grateful. 

     

    The reason why I was asking is because I have dozens of excel spread sheets with parameters set inside and copying that information in bulk into a worksheet does not work very well, even if I created the same number of material to match the excel spreadsheet, the copy and paste command does not copy the information in bulk...i would probably need to re-import it, and then re-copy it inside of vw. Additionally there is another element where if i update something in the excel spreadsheet, I would lose track of what was updated or not. Creating materials and their properties in bulk would be a more streamlined process I thought. 

     

    My current possibly solution would be to import worksheet using ODBC and then copying the information that way. In this way, the information is streamlined from one location, and can then be imported directly into the document using ODBC and then that information can be copied and pasted into the worksheet with the scripts.

     

    I am in the process of using a database editor to centralize all of my spreadsheet libraries with something like nocodb (https://www.nocodb.com/ )or grist (https://www.getgrist.com/)

  8.   @Christiaan  Look into using obsidian rather than native vectorworks. It is a knowledge based 2nd brain management system. The benefit is that you can have varied folder structure, but you can reference any element in the library structure to find anything you need regardless of directories. I've started developing my own office standards that way 

  9. @Shortnort

     

    This is always a game of time spent vs money earned. Right now i am going through the tedious process of evaluating the general work time needed for various types of projects and their respective square footage's. Once you assess the time required for various projects and their respective phases you then create a ballpark in relationship between the square footage project cost and general architectural fee. Given you will have various blanks in between different square footage costs, i then started to experiment with average rate of increase in between 2 projects with various square footage's (you can then deduce the percentage of the project cost with reference to the architectural soft costs to determine your own unique rate of return)

     

    Once that is evaluated, and the respective phases (degree of work in each phase percentage wise) are determined, your biggest element of return would be how quickly you work. Libraries and shortcuts are extremely crucial in saving time in the future - and would have a high degree of cost to you up front. But in the long term if it saves you 40% of the time to produce a set of documents, it is well worth it. 

     

    Shortcuts include

    1. Standard details based on wall types below (see next line)

    2. Standard wall types / floor types / roof types etc.. - with accurate information like R-values / U-values, STC values, UL values / UL reference, ASTM reference is needed

    2a. Standard material database that would be the composition of all of your standard wall types - with component weight, k-values, cost, manufacturer name, spec link, etc...

    3. Standard drawing types and worksheets to be used parametically with standard record bases that can be called out. For example

    - records for calculating zoning, building, energy code, etc...

    4. Standard components / objects / symbols with parametric information to used on plan for takeoffs. Can include everything from light fixtures to elevators to vehicle lifts, railings, soffits, gutters / leaders, furniture, hvac / plumbing components, etc...each one also with their own respective spec links, descriptions, costs etc...

     

    These elements I think would be the bulk of the hardest work for your standards, then the question - whether to BIM or not to BIM would be eliminated.

     

    As for your retainer...I agree with @jeff prince, its missing a zero 😉

    • Like 3
  10. Hello everyone. Given the number of materials both proprietary and generic out there, I was wondering if it would be possible to create a script or marionette that would create materials from a worksheet (including the properties, costs, k-values, and descriptions)

     

    Does anyone think this would be possible? Thank you in advance!

    • Like 2
  11. @GatRed

     

    Yea, I understand the frustration. Took me a bit of time to do it as well. The good thing is once you get it working, its a breeze after that.

     

    When you go into the iODBC driver options, is this what you see? Notice I have to pick a database name/table in order for me to access it. Also, do you have the tabs all the way at the bottom? (if not, click on the details button bottom left hand corner). Hopefully it's just your settings as iodbc connects just fine from the driver

     

    image.png.4a3ab4ef7248bdfd18fa4521dfc0a42d.png

     

    Also the error below i think means you didn't pick the database table to connect to. make sure they match names. I have a database table with the name window_catalog in it, and test your connection before closing as well. Maybe its just the table designation that's throwing it off.

     

    image.png.84d8776cbcd9cc976f335718eed824ab.png

    • Like 1
  12. what version of mysql is it? can you post the docker / docker compose script? Also, try playing with the settings of the mysql driver. They also have 2 drivers, 1 uni and 1 ansi. maybe the ansi one works better on mac?

     

    Also, as an experiment, try recreating another connection via iodbc driver. There are also certain options you can use in the connection, maybe there is something in the settings that is in conflict with VW

×
×
  • Create New...