<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to generate objects based on a .csv or excel file in 3ds Max Forum</title>
    <link>https://forums.autodesk.com/t5/3ds-max-forum/how-to-generate-objects-based-on-a-csv-or-excel-file/m-p/6924013#M64549</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This will be perfect for what I need to do!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much for your detailed response. It works in practice, I'll let you know how it goes when I implement it for everything.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;</description>
    <pubDate>Mon, 06 Mar 2017 16:37:58 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-03-06T16:37:58Z</dc:date>
    <item>
      <title>How to generate objects based on a .csv or excel file</title>
      <link>https://forums.autodesk.com/t5/3ds-max-forum/how-to-generate-objects-based-on-a-csv-or-excel-file/m-p/6905729#M64546</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to create &amp;gt;1000 objects in 3DSMax. All of them are cube shaped, but with different dimensions and textures.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have an excel sheet with the object name and the dimensions in XYZ. I also have a folder with the textures for each face of the object, named in a way that corresponds with the excel file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to write a script to automatically generate these objects based on the data?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've tried Google, but without much luck.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks in advance&lt;/P&gt;</description>
      <pubDate>Mon, 27 Feb 2017 12:26:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-forum/how-to-generate-objects-based-on-a-csv-or-excel-file/m-p/6905729#M64546</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-02-27T12:26:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate objects based on a .csv or excel file</title>
      <link>https://forums.autodesk.com/t5/3ds-max-forum/how-to-generate-objects-based-on-a-csv-or-excel-file/m-p/6908936#M64547</link>
      <description>&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/3ds-max-forum/linking-3ds-max-design-to-excel-files/td-p/5459652" target="_blank"&gt;https://forums.autodesk.com/t5/3ds-max-forum/linking-3ds-max-design-to-excel-files/td-p/5459652&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;script &lt;A href="http://www.scriptspot.com/forums/3ds-max/scripts-wanted/3ds-max-script-to-export-list-of-group-names-to-excel-file" target="_blank"&gt;http://www.scriptspot.com/forums/3ds-max/scripts-wanted/3ds-max-script-to-export-list-of-group-names-to-excel-file&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;search term &lt;A href="https://www.google.co.uk/?gfe_rd=cr&amp;amp;ei=UHm1WLTpGKzP8Afo9Jr4Bg&amp;amp;gws_rd=ssl#q=3ds+max+and+excel%3F&amp;amp;*" target="_blank"&gt;https://www.google.co.uk/?gfe_rd=cr&amp;amp;ei=UHm1WLTpGKzP8Afo9Jr4Bg&amp;amp;gws_rd=ssl#q=3ds+max+and+excel%3F&amp;amp;*&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2017 13:23:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-forum/how-to-generate-objects-based-on-a-csv-or-excel-file/m-p/6908936#M64547</guid>
      <dc:creator>irishman_team_kilber</dc:creator>
      <dc:date>2017-02-28T13:23:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate objects based on a .csv or excel file</title>
      <link>https://forums.autodesk.com/t5/3ds-max-forum/how-to-generate-objects-based-on-a-csv-or-excel-file/m-p/6914213#M64548</link>
      <description>&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Creating objects with data from an Excel file is fairly straightforward. &amp;nbsp;The goal is to create 3ds Max instructions in Excel that can be run as a script.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;The first thing I do is to turn on the Max Script Listener &lt;STRONG&gt;Scripting --&amp;gt; &amp;nbsp;MaxScript Listener...&lt;/STRONG&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;The next step is to do the action you want to duplicate with the script. &amp;nbsp;Since you want to add a bunch of boxes I would add one box and see what the&amp;nbsp;&lt;SPAN&gt;Max Script Listener shows. &amp;nbsp;Here's an example"&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;Box lengthsegs:1 widthsegs:1 heightsegs:1 length:4.64166 width:7.40208 height:7.6287 mapcoords:on pos:[74.7074,-24.8917,0] isSelected:on&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Let's assume my Excel file has the following layout for the box data:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ExcelBoxes1.JPG" style="width: 423px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/328304i1A6E37F3AC894B12/image-size/large?v=v2&amp;amp;px=999" role="button" title="ExcelBoxes1.JPG" alt="ExcelBoxes1.JPG" /&gt;&lt;/span&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;By using the&amp;nbsp;Excel concatenate function we can build the box creation command in G3. &amp;nbsp;For this example it would look like this:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;=CONCATENATE("Box lengthsegs:1 widthsegs:1 heightsegs:1 &amp;nbsp;length:",A3," width:",B3," height:",C3," mapcoords:on pos:[",D3,",",E3,",",F3,"]")&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Excel cell G3 would show:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;&lt;BR /&gt;Box lengthsegs:1 widthsegs:1 heightsegs:1 length:11 width:5 height:17.8 mapcoords:on pos:[25.738,24.075,16.81]&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Fill this expression down to the other rows of data and then copy and paste the contents of column G to Notepad.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ExcelBoxes2.JPG" style="width: 705px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/328307iDD1CBEE387C4DEA8/image-size/large?v=v2&amp;amp;px=999" role="button" title="ExcelBoxes2.JPG" alt="ExcelBoxes2.JPG" /&gt;&lt;/span&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Save the Notepad file as a &lt;STRONG&gt;.txt&lt;/STRONG&gt; file and then change the name of the file so that its file extension is &lt;STRONG&gt;.ms&lt;/STRONG&gt;&amp;nbsp;(for Max Script).&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;You can now use&amp;nbsp;&lt;STRONG&gt;Scripting --&amp;gt; &amp;nbsp;Run Script&lt;/STRONG&gt;&amp;nbsp;to execute the script and see the boxes!&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Use listener to see how materials are assigned to objects and use concatenate to duplicate that process.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Good luck!&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;~Lee&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Mar 2017 01:23:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-forum/how-to-generate-objects-based-on-a-csv-or-excel-file/m-p/6914213#M64548</guid>
      <dc:creator>leeminardi</dc:creator>
      <dc:date>2017-03-02T01:23:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate objects based on a .csv or excel file</title>
      <link>https://forums.autodesk.com/t5/3ds-max-forum/how-to-generate-objects-based-on-a-csv-or-excel-file/m-p/6924013#M64549</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This will be perfect for what I need to do!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much for your detailed response. It works in practice, I'll let you know how it goes when I implement it for everything.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Mar 2017 16:37:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-forum/how-to-generate-objects-based-on-a-csv-or-excel-file/m-p/6924013#M64549</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-03-06T16:37:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate objects based on a .csv or excel file</title>
      <link>https://forums.autodesk.com/t5/3ds-max-forum/how-to-generate-objects-based-on-a-csv-or-excel-file/m-p/6924316#M64550</link>
      <description>&lt;P&gt;Be careful with the commas in Concatenate and that the result duplicates the the Max format.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd like to hear how this works out for you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Lee&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Mar 2017 18:06:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-forum/how-to-generate-objects-based-on-a-csv-or-excel-file/m-p/6924316#M64550</guid>
      <dc:creator>leeminardi</dc:creator>
      <dc:date>2017-03-06T18:06:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate objects based on a .csv or excel file</title>
      <link>https://forums.autodesk.com/t5/3ds-max-forum/how-to-generate-objects-based-on-a-csv-or-excel-file/m-p/6949173#M64551</link>
      <description>&lt;P&gt;Hello&amp;nbsp;@Anonymous&amp;nbsp;and welcome to the community,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I just wanted to follow up on this, did this work for you? &amp;nbsp;(Excellent post btw&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/822616"&gt;@leeminardi&lt;/a&gt;!) &amp;nbsp;If this did work for you, can you please let me know so I (or you) can mark the post as a solution for the next person who needs this information? &amp;nbsp;Thanks very much!&lt;BR /&gt;&lt;BR /&gt;Best Regards,&lt;/P&gt;</description>
      <pubDate>Wed, 15 Mar 2017 23:12:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-forum/how-to-generate-objects-based-on-a-csv-or-excel-file/m-p/6949173#M64551</guid>
      <dc:creator>Alfred.DeFlaminis</dc:creator>
      <dc:date>2017-03-15T23:12:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate objects based on a .csv or excel file</title>
      <link>https://forums.autodesk.com/t5/3ds-max-forum/how-to-generate-objects-based-on-a-csv-or-excel-file/m-p/10889672#M64552</link>
      <description>&lt;P&gt;How to generate objects with x, y, z coordinates and rotation from an excel file?&lt;/P&gt;&lt;P&gt;Maybe it requires just a small modification of this script? Thank you in advance.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jan 2022 07:06:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-forum/how-to-generate-objects-based-on-a-csv-or-excel-file/m-p/10889672#M64552</guid>
      <dc:creator>zvonimirpetrovic89</dc:creator>
      <dc:date>2022-01-19T07:06:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate objects based on a .csv or excel file</title>
      <link>https://forums.autodesk.com/t5/3ds-max-forum/how-to-generate-objects-based-on-a-csv-or-excel-file/m-p/10891493#M64553</link>
      <description>&lt;P&gt;Working with rotations in 3D is tricky. The order in which you do rotations can affect an object’s final orientation. For example, if a box is rotated first by 30° about the x axis, then 25° about the y axis and then 10° it will have a different 3D orientation than a box that is first rotated by 10° about the z axis then 25° about the y axis and finally 30° about the z axis. For this reason I would rather deal with an object’s transformation matrix. This requires that you know the direction vectors for each of the local axes of the object.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, if you want to work with angle rotations then you can just use the following statements to rotate box Box001 by 30° about the x axis, then 25 about y and 10 about z:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Rotate $Box001 30.0 [1,0,0]
Rotate $Box001 25.0 [0,1,0]
Rotate $Box001 10.0 [0,0,1]&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;If you know the transformation matrix that you would like to assign to an object you can do that directly. For example, let’s say we would like to give Box002 the same orientation as Box001. The following will assign the transformation matrix of Box001 to the variable m.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;m = $Box001.transform&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The matrix m will look something like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(matrix3 [0.892539,0.157379,-0.422618] [0.0577152,0.889562,0.453154] [0.447262,-0.428849,0.784886] [200,200.0,100.83])&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It consists of 4 vectors. The first three define the directions of the object’s local x, y, and z axes. These vectors are usually unit vectors if the object has not been scaled. The 4th vector is the position vector.&lt;BR /&gt;If we assign &lt;STRONG&gt;m&lt;/STRONG&gt; to Box002 it will be at the same location as Box001 as well as the same orientation. To keep the position unchanged we extract the location of Box002 with:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;m.pos = $Box002.pos&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and now assign m to Box002:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;$Box002.transform = m&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now Box002 has the same orientation as Box001 but its position is unchanged.&lt;BR /&gt;Depending on whether you would like to work with angles (knowing their limitations) or matrices is up to you. If you provide a sample Excel file with data for a few boxes and how you want to set their orientation I can take a shot at adding a column that generates a Maxscript.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jan 2022 19:29:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-forum/how-to-generate-objects-based-on-a-csv-or-excel-file/m-p/10891493#M64553</guid>
      <dc:creator>leeminardi</dc:creator>
      <dc:date>2022-01-19T19:29:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate objects based on a .csv or excel file</title>
      <link>https://forums.autodesk.com/t5/3ds-max-forum/how-to-generate-objects-based-on-a-csv-or-excel-file/m-p/10893934#M64554</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/11182903"&gt;@zvonimirpetrovic89&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I've added the option to include rotation angles in an Excel worksheet that will be referenced when creating a Maxscript.&lt;/P&gt;&lt;P&gt;The content of cell J3 is:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;=CONCATENATE("Box length:",A3," width:",B3," height:",C3," mapcoords:on pos:[",D3,",",E3,",",F3,"] isSelected:on",CHAR(13),"rotate $ ",G3," [1,0,0]",CHAR(13),"rotate $ ",H3," [0,1,0]",CHAR(13),"rotate $ ",I3," [0,0,1]")&lt;/LI-CODE&gt;&lt;P&gt;Note that the CHAR(13) is used to add a carriage return to create a new line for the rotate functions.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1014011i9ACC426AD8BFEDCC/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;To use the Excel file as the source of a Maxscript copy the contents of cells J3 down to a text editor. I use Notepad++.&amp;nbsp; Before saving the file&amp;nbsp;&lt;STRONG&gt;BE SURE TO DELETE ALL " MARKS&lt;/STRONG&gt; (use replace " with nothing) then save with the &lt;STRONG&gt;.ms&lt;/STRONG&gt; filename extension.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 573px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1014010i389F041A57E0AEE7/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;For best results, keep rotation angles between -90° and +90°.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jan 2022 16:15:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-forum/how-to-generate-objects-based-on-a-csv-or-excel-file/m-p/10893934#M64554</guid>
      <dc:creator>leeminardi</dc:creator>
      <dc:date>2022-01-20T16:15:49Z</dc:date>
    </item>
  </channel>
</rss>

