Jump to content

Samuel Derenboim

Member
  • Posts

    483
  • Joined

  • Last visited

Posts posted by Samuel Derenboim

  1. In worksheets you can use =getspacenameforobj

     

    This will return all room names in the worksheets that your light fixture is located in.

     

    I used to do the same thing before i discovered these functions. Note - it will use your databade query to populate the space names.

     

    There are alot of functions in vw. If you want to learn more about more functions - go to the insert menu in the worksheet and click insert function...there will be a useful (looong) list of functions on how to use them

  2. So i have been browsing the VW function reference and noticed some interesting things

    https://developer.vectorworks.net/index.php/VS:AddSubMtrlToMtrl

    https://developer.vectorworks.net/index.php/VS:UpdateSubMtrlInMtrl

     

    there is a function to add, update and remove submaterials in a material. No functions (at least that i see) have the ability to get the name or the properties of the submaterials. What is, however, interesting is that these vectorscript functions have a handle called subMtrlName. I've used it as a function of objectdata, and have some interesting results.

    For reference I used this material in the library CMU 8x16 w/Mortar MT

    =OBJECTDATA(B3, subMtrlName, 1) - returns N/A for a compound object (based on material data sheet worksheet)

    =COMPONENTMATERIAL(B3, 1) = does not return anything - is blank

    =MATERIALPERCENT(T=MAT, 'Mortar MT') - returns 0 (Type=material i figured could have extracted something, but unfortuantely did not)

    =MATPROPERTYBYNAME(B3, submtrlName) - returned #PARMS? - which is interesting because submtrlName would become a handle that can actually be processed in the worksheets.

     

    @TomW Thought Id share in case you're experimenting

     

     

  3. 4 minutes ago, Tom W. said:

     

    I think we need @Nikolay Zhelyazkov's help on this...! There is a MaterialPercent() function but I have never used it before + testing it now can't get it to work on a Slab for example, only an Extrude... I think this is because it's not a component-specific function like all the ComponentMaterial ones.

     

    What I do is report on the quantities of the Simple Materials inside a component's Compound Material using MaterialSurfaceArea() MaterialVolume(). But this is the total quantity in the model (less anything in particular I need/want to exclude). I am less interested in the percentage because a reinforced concrete slab for example will be set up to return 100% of the surface area (for the mesh) + 100% of the volume (for the concrete) but I don't need to report these percentages, they perform an under the hood function.

     

    As regards returning this data from a component:

    I basically include this info in the Description field for a Compound Material: not the specific data you list because I don't want the Material name to appear or the percentage, but info about what the compound material is e.g. 'RC28/35 concrete with A393 steel reinforcement mesh in bottom (75mm cover)'. I know this isn't what you want though! You want to pull out data that is already there, not reenter it in a different field...

     

    @Tom W. You're right on the money. Essentially I am using the properties to create a parametric 'description' of materials, walls, slabs, etc... as well as volumetric, area and weight properties. For example - would it be possible to calculate the weight of a compound object? Theoretically you have the density of the compound objects and their respective thicknesses. When multiplied by the percentage of material the part makes up - i believe you can calculate the weight that way.

    Weight would be super terrific for load calculations for engineers. This in turn would help them design better and more effective structural systems that are more precise rather than the conservative values they may place per object. This can in turn save on steel.

     

    I know the differences would be negligible, but still, would be an effective decision making tool. (this is just one use case of extracting sub component materials)

     

    @Nikolay Zhelyazkov help please ! 😂

  4. @Tom W. & @Nikolay Zhelyazkov

     

    Here is a bit of a tougher question -- is it possible to call out the sub materials of a composite material in a tag - and / or their respective properties?

    i.e. If you have 2 materials in a composite material - Metal studs and Batt insulation - and you want them to be call out like :

     

    Composite material name

    Sub material 1 - Submaterial Tag / Description / percentage of composite material

    Sub material 2 - Submaterial Tag / Description / percentage of composite material

    etc...

     

    Again, thank you in advance!!

  5. @Nikolay Zhelyazkov Pardon the delay, Wanted to ask how to get the name of the material via #WS_MATPROPERTYBYNAME(COMPONENTMATERIAL(2), 'materialmark')#

     

    I've tried #WS_MATPROPERTYBYNAME(COMPONENTMATERIAL(2), 'material')#

    #WS_MATPROPERTYBYNAME(COMPONENTMATERIAL(2), 'materialname')#

    #WS_MATPROPERTYBYNAME(COMPONENTMATERIAL(2), 'name')#

    etc... cant seem to get it. 

    Could you please assist?

  6. 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

     

  7.  @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                  

  8. @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?

  9. 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)

  10. @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 😂😂

     

     

     

     

  11. 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
  12. @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/)

  13.   @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 

  14. @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
  15. 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
×
×
  • Create New...