SolidWorksMakroprogrammierung

Enumeration · SwConst

swAnimationOutputType_e-Enumeration

Dateiformat, in dem eine Bewegungsstudie als Animation gespeichert wird, etwa AVI-Video oder eine Folge von Einzelbildern.

Bibliothek SwConst · 10 Werte · im Code direkt mit Namen verwendbar, zum Beispiel swAnimationOutput_AVI

Syntax

Enum swAnimationOutputType_e
    swAnimationOutput_AVI           = 1
    swAnimationOutput_Series_of_BMP = 2
    swAnimationOutput_Series_of_TGA = 3
    swAnimationOutput_Series_of_PNG = 4
    swAnimationOutput_Series_of_JPG = 5
    swAnimationOutput_Series_of_TIF = 6
    swAnimationOutput_Series_of_MP4 = 7
    swAnimationOutput_Series_of_MKV = 8
    swAnimationOutput_Series_of_FLV = 9
    swAnimationOutput_Series_of_LXO = 10
End Enum

Werte

KonstanteWertBedeutung
swAnimationOutput_AVI1Microsoft-AVI-Video (.avi).
swAnimationOutput_Series_of_BMP2Folge von Windows-Bitmaps (.bmp), ein Bild je Frame.
swAnimationOutput_Series_of_TGA3Folge von Truevision-Targa-Bildern (.tga).
swAnimationOutput_Series_of_PNG4Dem Namen nach eine Folge von PNG-Bildern (.png).
swAnimationOutput_Series_of_JPG5Dem Namen nach eine Folge von JPEG-Bildern (.jpg).
swAnimationOutput_Series_of_TIF6Dem Namen nach eine Folge von TIFF-Bildern (.tif).
swAnimationOutput_Series_of_MP47Dem Namen nach ein MP4-Video (.mp4), ähnlich wie MKV und FLV.
swAnimationOutput_Series_of_MKV8Matroska-Video (.mkv).
swAnimationOutput_Series_of_FLV9Flash-Video (.flv).
swAnimationOutput_Series_of_LXO10Luxology-Szenendatei (.lxo).

Beispiel

' swMotionStudy ist eine MotionStudy, etwa aus MotionStudyManager.GetMotionStudy.
' swMotionMgr ist der MotionStudyManager, etwa aus ModelDocExtension.GetMotionStudyManager.
Dim swAviPar As SwMotionStudy.AVIParameter
Dim bOk As Boolean
Set swAviPar = swMotionMgr.CreateAVIParameter
swAviPar.OutputType = swAnimationOutput_AVI
swAviPar.SaveEntireAnimation = True
bOk = swMotionStudy.SaveToAVI("C:\Temp\Animation.avi", swAviPar)

Bemerkungen

Den Wert setzt du in der Eigenschaft OutputType eines AVIParameter und übergibst die Parameter dann an MotionStudy.SaveToAVI. Beide Objekte stammen aus der Typbibliothek für Bewegungsstudien, nicht aus der SldWorks-Bibliothek. Dein Makro braucht deshalb einen Verweis auf „SOLIDWORKS MotionStudy“. Den Einstieg liefert ModelDocExtension.GetMotionStudyManager.

Trotz Series_of im Namen beschreibt die Hilfe MKV und FLV als Videodatei und LXO als Szenendatei, also nicht als Bildfolge. JPG, PNG, TIF und MP4 beschreibt die Hilfe nur mit ihrem Namen.

Siehe auch

Englisches Original: swAnimationOutputType_e in der SOLIDWORKS API-Hilfe ↗

Fragen zu diesem Befehl oder ein Befehl fehlt? Frag im Discord.