Jump to content

Generate materials from vectorscript / marionette query


Recommended Posts

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!

Edited by Samuel Derenboim
  • Like 2
Link to comment
  • Samuel Derenboim changed the title to Generate materials from vectorscript / marionette query

@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/)

Link to comment

I have a couple of bugs filed on worksheets that are going to make what you want harder than it should be.

 

1. There is a "bug" (actually I filed an enhancement request [Wish]) where you can't copy/paste multiple columns into database subrows.  It works fine with a single column but trying to do multiple columns is really a pain.

 

2. There was a problem pasting from Excel (and Numbers) that was supposedly fixed for VW2023, but while the problem is different, paste from Excel still does not seem to work properly.

 

So you may be able to Import from Excel and then use a script to generate the Materials.

 

How do you want to move forward?

Link to comment
  • 1 month later...

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

 

 

 

 

Edited by Samuel Derenboim
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...