Results 1 to 6 of 6

Thread: Datumsstempel in IDW

  1. #1
    Member
    Join Date
    2007-08
    Posts
    42
    Login to Give a bone
    0

    Default Datumsstempel in IDW

    Hallo,
    ich suche eine Möglichkeit, in einer IDW immer ein sich automatisch aktualiesierendes Datum abzubilden. Z.B bei jedem speichern.
    Beim Dateinamen geht das, aber beim Datum??
    (ähnlich beim AutoCAD "RText")
    Machmal existieren halt mehrere Ausdrucke von unterschiedlichen Tagen und man weiss nicht, welche die neueste ist.
    Gruß, Ivanka

  2. #2
    100 Club mziegler's Avatar
    Join Date
    2007-04
    Location
    Bad Waldsee
    Posts
    107
    Login to Give a bone
    0

    Default Re: Datumsstempel in IDW

    Das müsste mit der IProperty Collection 2.4 realisierbar sein.
    Dort wird eine Eigenschaft namens SavedDate generiert.

    Hilft dir das weiter?

    Grüße

    mziegler

  3. #3
    Member
    Join Date
    2007-08
    Posts
    42
    Login to Give a bone
    0

    Default Re: Datumsstempel in IDW

    nee, das tuts leider nicht.
    in dieser variable ist wohl gespeichert, wann die Zeichnungsvorlage (templates) gespeichert wurde (bei mir halt März 2006) oder so.
    aber dieses Datum aktualisiert sich nicht.
    :-/

  4. #4
    100 Club mziegler's Avatar
    Join Date
    2007-04
    Location
    Bad Waldsee
    Posts
    107
    Login to Give a bone
    0

    Default Re: Datumsstempel in IDW

    Ich probier das mal aus ob man das vielleicht auch mit einem Makro hinkriegt.

    Kann aber en bisschen dauern

    EDIT:

    Ich hab es mal mit der IProperty Collection ausprobiert(siehe Screenshot). Die Eigenschaft SavedDate und SavedTime kommt vom Bauteil - also nicht von der Zeichnung.

    Um dieses Datum zu ändern musst du also das Bauteil oder die Baugruppe abspeichern. (Ist wohl nicht das was du brauchst, oder?)

    ich such weiter .....
    Attached Images Attached Images
    Last edited by mziegler; 2007-09-06 at 06:34 AM.

  5. #5
    100 Club mziegler's Avatar
    Join Date
    2007-04
    Location
    Bad Waldsee
    Posts
    107
    Login to Give a bone
    0

    Default Re: Datumsstempel in IDW

    Hier mal ein kleines "sehr" einfaches Makro. Es erstellt in der unteren linken Ecke eine Textbox mit der aktuellen Zeit. Automatisch läuft da aber noch nichts ab.

    Code:
    Public Sub SketchTextAdd()
        ' Set a reference to the drawing document.
        ' This assumes a drawing document is active.
        Dim oDrawDoc As DrawingDocument
        Set oDrawDoc = ThisApplication.ActiveDocument
    
        ' Create a new sketch on the active sheet.
        Dim oSketch As DrawingSketch
        Set oSketch = oDrawDoc.ActiveSheet.Sketches.Add
    
        ' Open the sketch for edit so the text boxes can be created.
        ' This is only required for drawing sketches, not part.
        oSketch.Edit
    
        Dim oTG As TransientGeometry
        Set oTG = ThisApplication.TransientGeometry
    
        ' Create text with simple string as input. Since this doesn't use
        ' any text overrides, it will default to the active text style.
        Dim sText As String
       
        sText = VBA.Date$ & "-" & VBA.Time$
        
        Dim oTextBox As TextBox
        Set oTextBox = oSketch.TextBoxes.AddFitted(oTG.CreatePoint2d(1.01, 1.5), sText)
    
        ' Exit the sketch from the edit environment.
        oSketch.ExitEdit
    End Sub

  6. #6
    Member
    Join Date
    2007-08
    Posts
    42
    Login to Give a bone
    0

    Default Re: Datumsstempel in IDW

    Hey danke für Deine Mühen.
    Aber das Problem bei Macros, die man jedesmal aktivieren / anklicken muß, vergisst man das sowieso dauernd.
    Es sollte schon was sein, was automatisch abläuft...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •