Re: MAcro Help Please!

If you can show us what you have so far, we can help.

Best Regards,

Reply to
Robert V. Hanson
Loading thread data ...

Would it be possible to use a screen capture program such as SnagIt

formatting link
so, you could just move the assembly in real time and the AVI would be done.

JJ

Reply to
JJ

HI Robert,

This is what I have so far.

****************************** Dim swApp As Object Dim Part As Object Dim RotateStep As Integer

Sub main()

Dim DocPath As String

Set swApp = CreateObject("SldWorks.Application") Set Part = swApp.ActiveDoc TotalPath = Part.GetPathName SlashPosition = InStrRev(TotalPath, "\", , 1) DocPath = Left(Part.GetPathName, SlashPosition - 1)

Message = "JPEG's will be saved in Current Document Folder: " & DocPath Icon = swMbInformation Buttons = swMbOkCancel Title = "Capture JPEG" ' Set title. Result = swApp.SendMsgToUser2(Message, Icon, Buttons)

For RotateStep = 1 To 3 Part.ModelDoc2.Rebuild (swUpdateMates)

Part.ShowNamedView2 "*Isometric", 7 Part.ViewZoomtofit2 Part.SaveAs2 DocPath & "\iso-"RotateStep".JPG", 0, True, False

RotateStep = RotateStep + 1 Next RotateStep

End Sub

***********************************
Reply to
Muggs

Hello Philippe,

Darn!!! I saw your website on friday when i started thinking about this, but I didn't see the link to the macro.

DUH!!! BTW, I thought that I would use JASC's Animation Shop or something.

Thank You, Muggs

Reply to
Muggs

Thanks JJ,

Yes, I have SnagIt, and I love it, and for that it's perfect. But, I'm want is to show only part of an assembly rotating about an axis, imagine a fan blade rotating inside of a fan assembly, and you'll have a pretty good idea of what I want.

Thanks again, Muggs

Reply to
Muggs

what if you put that in an assembly and added the simulation/rotary motion to it and played while using SnagIt ofcourse this would only work from 2003 and up.

be

Reply to
Corey Scheich

Thanks Corey,

Yea, I'm not giving you all the info, I'm using 2001Plus, sorry.

Muggs

Reply to
Muggs

If you are looking to rotate in a certain direction after setting to isometric view, you can't include the Part.ShowNamedView2 "*Isometric", 7 line in the For loop. Please take a look at ModelDoc::ViewRotateplusx after setting the standard increment setting to 5 deg., you can use this function or others like it to rotate the part.

HTH,

Reply to
Robert V. Hanson

The line Part.SaveAs2 DocPath & "\iso-"RotateStep".JPG", 0, True, False

should read Part.SaveAs2 DocPath & "\iso-" & RotateStep & ".JPG", 0, True, False ('&' added two places)

-- Tony O'Hara Melbourne, Australia.

Reply to
Tony O'Hara

If you only want to rotate a "fan" and not pan around the rest of the assembly then you only need enough frames to rotate the fan one blade position. ie, 6 blades to appear to spin 360deg, just rotate fand thru 59 deg (or it will repeat the first frame), then in you animation program just loop the sequence. Unless of course you have different coloured blades.

Yes, I have SnagIt, and I love it, and for that it's perfect. But, I'm want is to show only part of an assembly rotating about an axis, imagine a fan blade rotating inside of a fan assembly, and you'll have a pretty good idea of what I want.

Thanks again, Muggs

Reply to
Darryl Jenkins

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.