SolidWorksMakroprogrammierung

Enumeration · SwConst

swDrawingNotify_e-Enumeration

Kennungen der Ereignisse einer Zeichnung (DrawingDoc), etwa Blatt aktiviert, Zeichenansicht erstellt oder gespeichert. Für C++-Add-ins.

Bibliothek SwConst · 63 Werte · im Code direkt mit Namen verwendbar, zum Beispiel swDrawingRegenNotify

Syntax

Enum swDrawingNotify_e
    swDrawingRegenNotify                         = 1
    swDrawingDestroyNotify                       = 2   ' veraltet
    swDrawingRegenPostNotify                     = 3
    swDrawingViewNewNotify                       = 4   ' veraltet
    swDrawingNewSelectionNotify                  = 5
    swDrawingFileSaveNotify                      = 6
    swDrawingFileSaveAsNotify                    = 7   ' veraltet
    swDrawingLoadFromStorageNotify               = 8
    swDrawingSaveToStorageNotify                 = 9
    swDrawingAutoSaveNotify                      = 10
    swDrawingAutoSaveToStorageNotify             = 11
    swDrawingConfigChangeNotify                  = 12
    swDrawingConfigChangePostNotify              = 13
    swDrawingViewNewNotify2                      = 14
    swDrawingAddItemNotify                       = 15
    swDrawingRenameItemNotify                    = 16
    swDrawingDeleteItemNotify                    = 17
    swDrawingModifyNotify                        = 18
    swDrawingFileReloadNotify                    = 19
    swDrawingAddCustomPropertyNotify             = 20
    swDrawingChangeCustomPropertyNotify          = 21
    swDrawingDeleteCustomPropertyNotify          = 22
    swDrawingFileSaveAsNotify2                   = 23
    swDrawingDeleteSelectionPreNotify            = 24
    swDrawingFileReloadPreNotify                 = 25
    swDrawingFileSavePostNotify                  = 26
    swDrawingLoadFromStorageStoreNotify          = 27
    swDrawingSaveToStorageStoreNotify            = 28
    swDrawingFeatureManagerTreeRebuildNotify     = 29
    swDrawingViewCreatePreNotify                 = 30
    swDrawingDynamicHighlightNotify              = 31
    swDrawingDimensionChangeNotify               = 32
    swDrawingFileReloadCancelNotify              = 33
    swDrawingFileSavePostCancelNotify            = 34
    swDrawingSketchSolveNotify                   = 35
    swDrawingDeleteItemPreNotify                 = 36
    swDrawingClearSelectionsNotify               = 37
    swDrawingEquationEditorPreNotify             = 38
    swDrawingEquationEditorPostNotify            = 39
    swDrawingAddDvePagePreNotify                 = 40
    swDrawingUnitsChangeNotify                   = 41
    swDrawingDestroyNotify2                      = 42
    swDrawingUndoPostNotify                      = 43
    swDrawingUserSelectionPreNotify              = 44
    swDrawingRedoPostNotify                      = 45
    swDrawingRedoPreNotify                       = 46
    swDrawingUndoPreNotify                       = 47
    swDrawingAutoSaveToStorageStoreNotify        = 48
    swDrawingInsertTableNotify                   = 49
    swDrawingModifyTableNotify                   = 50
    swDrawingUserSelectionPostNotify             = 51
    swDrawingActivateSheetPreNotify              = 52
    swDrawingActivateSheetPostNotify             = 53
    swDrawingCommandManagerTabActivatedPreNotify = 54
    swDrawingFeatureManagerTabActivatedPreNotify = 55
    swDrawingFeatureManagerTabActivatedNotify    = 56
    swDrawingRenameDisplayTitleNotify            = 57
    swDrawingDisplayPaneExpandNotify             = 58
    swDrawingDisplayPaneCollapseNotify           = 59
    swDrawingStateChangeNotify                   = 60
    swViewPositionChangeNotify                   = 61
    swDrawingAddDependencyNotify                 = 62
    swDrawingDeleteDependencyNotify              = 63
End Enum

Werte

KonstanteWertBedeutung
swDrawingRegenNotify1Ereignis DrawingDoc.RegenNotify: Die Zeichnung wird gleich neu aufgebaut.
swDrawingDestroyNotify2veraltet Ersetzt durch swDrawingDestroyNotify2.
swDrawingRegenPostNotify3Ereignis DrawingDoc.RegenPostNotify: Die Zeichnung wurde neu aufgebaut.
swDrawingViewNewNotify4veraltet Ersetzt durch swDrawingViewNewNotify2.
swDrawingNewSelectionNotify5Ereignis DrawingDoc.NewSelectionNotify: Die Auswahlliste hat sich geändert. Elemente wurden hinzugefügt, entfernt oder umsortiert.
swDrawingFileSaveNotify6Ereignis DrawingDoc.FileSaveNotify: Die Zeichnung wird gleich gespeichert. Das Ereignis liefert den Dateinamen.
swDrawingFileSaveAsNotify7veraltet Ersetzt durch swDrawingFileSaveAsNotify2.
swDrawingLoadFromStorageNotify8Ereignis DrawingDoc.LoadFromStorageNotify: Jetzt kannst du eigene Daten aus dem Speicher für Drittanbieter (IStream) lesen. Kommt auch, wenn dieser Speicher leer ist.
swDrawingSaveToStorageNotify9Ereignis DrawingDoc.SaveToStorageNotify: Jetzt kannst du eigene Daten in den Speicher für Drittanbieter (IStream) schreiben.
swDrawingAutoSaveNotify10Ereignis DrawingDoc.AutoSaveNotify: Die Zeichnung wurde automatisch gespeichert. Das Ereignis liefert den Dateinamen.
swDrawingAutoSaveToStorageNotify11Ereignis DrawingDoc.AutoSaveToStorageNotify: Die Zeichnung wird automatisch in den Speicher für Drittanbieter (IStream) gespeichert.
swDrawingConfigChangeNotify12Ereignis DrawingDoc.ActiveConfigChangeNotify: Der Benutzer wechselt gleich zu einer anderen Konfiguration.
swDrawingConfigChangePostNotify13Ereignis DrawingDoc.ActiveConfigChangePostNotify: Der Benutzer hat zu einer anderen Konfiguration gewechselt.
swDrawingViewNewNotify214Ereignis DrawingDoc.ViewNewNotify2: Ein neues Modellfenster (ModelView) wurde angelegt, etwa durch Teilen des Fensters oder ein neues Fenster.
swDrawingAddItemNotify15Ereignis DrawingDoc.AddItemNotify: Ein Element wurde einem Baum hinzugefügt, etwa dem FeatureManager oder dem ConfigurationManager. Das Ereignis liefert die Art des Elements als Wert aus swNotifyEntityType_e und seinen Namen.
swDrawingRenameItemNotify16Ereignis DrawingDoc.RenameItemNotify: Ein Element wurde in einem Baum umbenannt, etwa im FeatureManager oder im ConfigurationManager. Das Ereignis liefert die Art des Elements als Wert aus swNotifyEntityType_e sowie alten und neuen Namen.
swDrawingDeleteItemNotify17Ereignis DrawingDoc.DeleteItemNotify: Ein Element wurde aus einem Baum gelöscht, etwa aus dem FeatureManager oder dem ConfigurationManager. Das Ereignis liefert die Art des Elements als Wert aus swNotifyEntityType_e und seinen Namen.
swDrawingModifyNotify18Ereignis DrawingDoc.ModifyNotify: Die Zeichnung wurde zum ersten Mal als geändert markiert. Nach dem Speichern kommt es bei der nächsten Änderung wieder.
swDrawingFileReloadNotify19Wird nicht verwendet.
swDrawingAddCustomPropertyNotify20Ereignis DrawingDoc.AddCustomPropertyNotify: Der Benutzer hat eine Dateieigenschaft hinzugefügt.
swDrawingChangeCustomPropertyNotify21Ereignis DrawingDoc.ChangeCustomPropertyNotify: Der Benutzer hat eine Dateieigenschaft geändert.
swDrawingDeleteCustomPropertyNotify22Ereignis DrawingDoc.DeleteCustomPropertyNotify: Der Benutzer hat eine Dateieigenschaft gelöscht.
swDrawingFileSaveAsNotify223Ereignis DrawingDoc.FileSaveAsNotify2: Die Zeichnung wird gleich unter einem neuen Namen gespeichert. Kommt, bevor SOLIDWORKS den Dialog zum Speichern zeigt. Das Ereignis liefert den Dateinamen.
swDrawingDeleteSelectionPreNotify24Ereignis DrawingDoc.DeleteSelectionPreNotify: Die Auswahl wird gleich gelöscht.
swDrawingFileReloadPreNotify25Wird nicht verwendet.
swDrawingFileSavePostNotify26Ereignis DrawingDoc.FileSavePostNotify: Die Zeichnung wurde gespeichert.
swDrawingLoadFromStorageStoreNotify27Ereignis DrawingDoc.LoadFromStorageStoreNotify: Jetzt kannst du eigene Daten aus dem Speicher für Drittanbieter (IStorage) lesen.
swDrawingSaveToStorageStoreNotify28Ereignis DrawingDoc.SaveToStorageStoreNotify: Jetzt kannst du eigene Daten in den Speicher für Drittanbieter (IStorage) schreiben.
swDrawingFeatureManagerTreeRebuildNotify29Ereignis DrawingDoc.FeatureManagerTreeRebuildNotify: Der FeatureManager der Zeichnung wird neu aufgebaut.
swDrawingViewCreatePreNotify30Ereignis DrawingDoc.ViewCreatePreNotify: Eine Zeichenansicht wird gleich erstellt. Das Ereignis liefert das Modelldokument, bei einer leeren Zeichenansicht Nothing.
swDrawingDynamicHighlightNotify31Ereignis DrawingDoc.DynamicHighlightNotify: Die dynamische Hervorhebung des gewählten Objekts wird ein- oder ausgeschaltet.
swDrawingDimensionChangeNotify32Ereignis DrawingDoc.DimensionChangeNotify: Eine Bemaßung wurde im Dialog zum Ändern der Bemaßung geändert. Das Ereignis liefert die Bemaßung (DisplayDimension).
swDrawingFileReloadCancelNotify33Wird nicht verwendet.
swDrawingFileSavePostCancelNotify34Ereignis DrawingDoc.FileSavePostCancelNotify: Kommt statt DrawingDoc.FileSavePostNotify, wenn die Zeichnung nicht gespeichert wurde.
swDrawingSketchSolveNotify35Ereignis DrawingDoc.SketchSolveNotify: Eine Skizze wurde gelöst, etwa beim Ziehen eines Skizzenelements oder beim Ändern von Beziehungen und Bemaßungen. Das Ereignis liefert den Namen der Skizze.
swDrawingDeleteItemPreNotify36Ereignis DrawingDoc.DeleteItemPreNotify: Ein Element wird gleich aus einem Baum gelöscht, etwa aus dem FeatureManager oder dem ConfigurationManager. Das Ereignis liefert die Art des Elements als Wert aus swNotifyEntityType_e und seinen Namen.
swDrawingClearSelectionsNotify37Ereignis DrawingDoc.ClearSelectionsNotify: Die Auswahl wurde mit dem Befehl zum Aufheben der Auswahl gelöscht.
swDrawingEquationEditorPreNotify38Ereignis DrawingDoc.EquationEditorPreNotify: Der Dialog für Gleichungen wurde geöffnet.
swDrawingEquationEditorPostNotify39Ereignis DrawingDoc.EquationEditorPostNotify: Der Dialog für Gleichungen wird geschlossen.
swDrawingAddDvePagePreNotify40Wird nicht verwendet.
swDrawingUnitsChangeNotify41Ereignis DrawingDoc.UnitsChangeNotify: Die Einheiten der Zeichnung haben sich geändert.
swDrawingDestroyNotify242Ereignis DrawingDoc.DestroyNotify2: Die Zeichnung wird gleich zerstört. Das Ereignis liefert einen Wert aus swDestroyNotifyType_e: Die Zeichnung wird aus dem Speicher entfernt oder bleibt wegen eines Verweises von außen geöffnet.
swDrawingUndoPostNotify43Ereignis DrawingDoc.UndoPostNotify: Eine Aktion wurde rückgängig gemacht.
swDrawingUserSelectionPreNotify44Ereignis DrawingDoc.UserSelectionPreNotify: Der Benutzer bewegt den Mauszeiger über eine Zeichenansicht oder klickt hinein. Auswahlen per Makro lösen es nicht aus.
swDrawingRedoPostNotify45Ereignis DrawingDoc.RedoPostNotify: Eine Aktion wurde wiederhergestellt.
swDrawingRedoPreNotify46Ereignis DrawingDoc.RedoPreNotify: Eine Aktion wird gleich wiederhergestellt.
swDrawingUndoPreNotify47Ereignis DrawingDoc.UndoPreNotify: Eine Aktion wird gleich rückgängig gemacht.
swDrawingAutoSaveToStorageStoreNotify48Ereignis DrawingDoc.AutoSaveToStorageStoreNotify: Die Zeichnung wird automatisch in den Speicher für Drittanbieter (IStorage) gespeichert.
swDrawingInsertTableNotify49Ereignis DrawingDoc.InsertTableNotify: In die Zeichnung wurde eine Tabelle eingefügt.
swDrawingModifyTableNotify50Ereignis DrawingDoc.ModifyTableNotify: Eine Tabelle der Zeichnung wurde geändert. Das Ereignis liefert die Art der Änderung als Wert aus swModifyTableNotifyReason_e.
swDrawingUserSelectionPostNotify51Ereignis DrawingDoc.UserSelectionPostNotify: Der Benutzer hat in der Zeichnung ein Element ausgewählt.
swDrawingActivateSheetPreNotify52Ereignis DrawingDoc.ActivateSheetPreNotify: Ein Blatt wird gleich aktiviert. Das Ereignis liefert den Namen des Blatts.
swDrawingActivateSheetPostNotify53Ereignis DrawingDoc.ActivateSheetPostNotify: Ein Blatt wurde aktiviert. Das Ereignis liefert den Namen des Blatts.
swDrawingCommandManagerTabActivatedPreNotify54Ereignis DrawingDoc.CommandManagerTabActivatedPreNotify: Eine Registerkarte im CommandManager wird gleich aktiviert.
swDrawingFeatureManagerTabActivatedPreNotify55Ereignis DrawingDoc.FeatureManagerTabActivatedPreNotify: Die aktive Registerkarte im FeatureManager-Bereich wechselt gleich.
swDrawingFeatureManagerTabActivatedNotify56Ereignis DrawingDoc.FeatureManagerTabActivatedNotify: Die aktive Registerkarte im FeatureManager-Bereich hat gewechselt.
swDrawingRenameDisplayTitleNotify57Ereignis DrawingDoc.RenameDisplayTitleNotify: Der angezeigte Titel eines Elements im FeatureManager hat sich geändert.
swDrawingDisplayPaneExpandNotify58Ereignis DrawingDoc.DisplayPaneExpandNotify: Ein Anzeigebereich der Zeichnung wurde aufgeklappt.
swDrawingDisplayPaneCollapseNotify59Ereignis DrawingDoc.DisplayPaneCollapseNotify: Ein Anzeigebereich der Zeichnung wurde zugeklappt.
swDrawingStateChangeNotify60Ereignis DrawingDoc.DrawingStateChangeNotify: Der Zustand der Zeichnung hat sich geändert.
swViewPositionChangeNotify61Ereignis DrawingDoc.ViewPositionChangeNotify: Eine Zeichenansicht hat ihre Position geändert.
swDrawingAddDependencyNotify62Ereignis DrawingDoc.AddDependencyNotify: Die Zeichnung referenziert ein Dokument zum ersten Mal. Das Ereignis liefert dessen vollständigen Pfad.
swDrawingDeleteDependencyNotify63Ereignis DrawingDoc.DeleteDependencyNotify: Die Zeichnung referenziert ein Dokument nicht mehr. Das Ereignis liefert dessen vollständigen Pfad.

Beispiel

' Im Klassenmodul. swDraw ist eine Zeichnung (DrawingDoc).
Private WithEvents swDraw As SldWorks.DrawingDoc

' swDraw_ActivateSheetPostNotify ist die Ereignisprozedur zu ActivateSheetPostNotify.
Private Function swDraw_ActivateSheetPostNotify(ByVal SheetName As String) As Long
    Debug.Print "Aktives Blatt: " & SheetName
End Function

' swDraw_DestroyNotify2 ist die Ereignisprozedur zu DestroyNotify2.
Private Function swDraw_DestroyNotify2(ByVal DestroyType As Long) As Long
    If DestroyType = swDestroyNotifyDestroy Then Set swDraw = Nothing
End Function

Bemerkungen

Die Werte nennen die Ereignisse von DrawingDoc. Ein C++-Add-in meldet sich mit ihnen für die Ereignisse an, und zwar für jede Zeichnung einzeln. In VBA brauchst du die Konstanten nicht: Du deklarierst die Zeichnung mit WithEvents in einem Klassenmodul und schreibst Ereignisprozeduren wie swDraw_ActivateSheetPostNotify. Die Ereignisse anderer Dokumente stehen in eigenen Enumerationen, etwa swAssemblyNotify_e für Baugruppen und swPartNotify_e für Teile.

Nicht jeder Name passt eins zu eins zum Ereignis: swDrawingConfigChangeNotify gehört zu DrawingDoc.ActiveConfigChangeNotify, swDrawingStateChangeNotify zu DrawingDoc.DrawingStateChangeNotify und swViewPositionChangeNotify zu DrawingDoc.ViewPositionChangeNotify. Zu manchen Ereignissen gibt es mehrere Versionen, etwa swDrawingFileSaveAsNotify und swDrawingFileSaveAsNotify2. Nimm die neueste. Du sollst nicht gleichzeitig auf DrawingDoc.FileSaveAsNotify2 und das veraltete DrawingDoc.FileSaveAsNotify hören. Bei einer noch nie gespeicherten Zeichnung kommt beim Speichern DrawingDoc.FileSaveAsNotify2 statt DrawingDoc.FileSaveNotify.

Einige Ereignisseiten der Hilfe nennen zum Anmelden einen Namen, den es in dieser Liste nicht gibt: swDrawingAddDepndencyNotify und swDrawingDeleteDepndencyNotify (gemeint sind dem Namen nach swDrawingAddDependencyNotify und swDrawingDeleteDependencyNotify), bei DrawingDoc.ClearSelectionsNotify swDrawingClearNotificationsNotify statt swDrawingClearSelectionsNotify. DrawingDoc.FileSaveNotify verweist auf swDrawingFileSaveAsNotify2, dem Namen nach passt swDrawingFileSaveNotify. Umgekehrt nennt die Seite zu DrawingDoc.FileReloadPreNotify swDrawingFileReloadPreNotify zum Anmelden, obwohl die Enumeration den Wert als nicht verwendet führt.

Siehe auch

  • DrawingDoc.ActivateSheetPostNotify
  • DrawingDoc.DestroyNotify2
  • DrawingDoc.FileSaveAsNotify2
  • swAssemblyNotify_e

Englisches Original: swDrawingNotify_e in der SOLIDWORKS API-Hilfe ↗

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