I was wondering if somebody can help me with a script I need.
I have a simple object in max with a motion. I need to export that box at certain frames as one dwg file. (lets say frames 50 53 89 100) so when I open the dwg file in cad I can see four boxes which their positions are based on frames 50 53 89 and 100 in max.
Thanks.
Forum topic · Scripts Wanted
Export positions at multiple frames
By cuatcside · 2013-02-20
Comments (8)
Comment policy
It worked for the 3d object.Thanks a lot. If I want to have it to work with a 3d spline as well do I need to make any changes?
Thanks again
I hope that Panayon not mind if i use his code
obj = selection[1]
frm = #(50, 53, 89, 100)
max select none
for f in frm do at time f do
(
if isKindOf obj GeometryClass and not isKindOf obj TargetObject then
(
snapshot obj
selectMore objects[objects.count]
) else select obj
)
myFile = GetDir #export + "/my_name.dwg"
exportFile myFile #noPrompt selectedOnly:on
:)
I miss "do" :) thanks for testing my code.
Here is a bit of modification:
This way s'd be able to work on shapes as well.
here is the base
Thanks for your help.
I copied your code to maxscrip editor and changed your myFile line to myFile = GetDir #export + "c:\1.dwg" and ran it, got this error.
Do I need to make any changes to script beside myFile =...
obj = selection[1]
frm = #(50, 53, 89, 100)
max select none
for f in frm at time f do (
snapshot obj
selectMore objects[objects.count]
)
myFile = GetDir #export + "c:\1.dwg"
exportFile myFile #noPrompt selectedOnly:on
-- Error occurred in anonymous codeblock; filename: C:\Users\ali\AppData\Local\Autodesk\3dsMax\2012 - 64bit\enu\UI\usermacros\; position: 82; line: 5
-- Syntax error: at at, expected "do" or "collect"
-- In line: for f in frm at t
Thanks again for your help.
Your path are wrong
myFile = GetDir #export + "\\1.dwg"
--or
myFile = GetDir #export + "/1.dwg"
changed the path, and still getting error:
-- Error occurred in anonymous codeblock; filename: C:\Users\ali\AppData\Local\Autodesk\3dsMax\2012 - 64bit\enu\UI\usermacros\; position: 82; line: 5
-- Syntax error: at at, expected "do" or "collect"
-- In line: for f in frm at t
Change the line
for f in frm do at time f ( ... }