Skip to main content
1-Visitor
Jun 19, 2012 8:31 PM UTC
Question

Mapkey logging

All -

I am curious if anyone has found an unobtrusive way to log mapkey use. I simply want name of the mapkey logged to a file each time the mapkey is activated by a user.

    4 replies

    22-Sapphire I
    Jun 19, 2012 9:46 PM UTC
    Don't know if you can, but if a mapkey can be made to do something on a network drive that could be collected that would be a way to approach. Maybe there could be one file or folder on a network drive for each mapkey, and the mapkey could have a bit of code that would do this..

    We sort of have need for this also - would be nice to have a good way.

    Just a thought: Example - A mapkey could include a step for: Info / Session Info / Message log, then Save As, then select the appropriate network location, then fill in the filename with the mapkey name.

    Or - Could use Bill Kunz' approach and just remove them one at a time and see who screams 🙂
    Translate
    17-Peridot
    Jun 19, 2012 10:00 PM UTC
    Mike,

    Here a mapkey called es_pdf, but I can't get it to write to a UNC path like
    \garm\ptc_apps\ptc\mapkey_logging\Usage_Log.txt

    All you have to do is add the two lines in blue to your existing mapkeys
    and change the name (highlighted in red) in the second blue line to match
    the name of the mapkey.



    mapkey es_pdf @MAPKEY_NAMECreats pdfs;@MAPKEY_LABELpdf creator;\
    mapkey(continued) @SYSTEMSET \
    mapkey(continued) UseLog=C:\Users\1035729\ptc\mapkey_logging
    \Usage_Log.txt\nECHO \
    mapkey(continued) \%USERNAME\%,\%DATE\%,\%TIME\%,es_pdf >> \%UseLog\%;\
    mapkey(continued) ~ Command `ProCmdModelMkPdf` ;\
    mapkey(continued) ~ Select `intf_pdf` `PDFMainTab`1 `PDFContent`;\
    mapkey(continued) ~ Select `intf_pdf` `pdf_font_stroke`1
    `pdf_stroke_all`;\
    mapkey(continued) ~ Activate `intf_pdf` `pdf_btn_ok`;



    If anyone can get to write out to an UNC or DFS path, please share it with
    us.

    Thank you,

    Lance J Lie
    Information Technology
    SAS IT Info. Solutions App. Eng.
    Space and Airborne Systems
    Raytheon Company

    +1 310.616.1551 (office)
    +1 310.426.4968 (cell)
    +1 310.647.0315 (fax)
    -

    2000 E. El Segundo Blvd.
    El Segundo, CA 90245 USA
    www.raytheon.com



    Raytheon Sustainability

    This message contains information that may be confidential and privileged.
    Unless you are the addressee (or authorized to receive mail for the
    addressee), you should not use, copy or disclose to anyone this message or
    any information contained in this message. If you have received this
    message in error, please so advise the sender by reply e-mail and delete
    this message. Thank you for your cooperation.



    From: "Lockwood,Mike,IRVINE,R&D" <mike.lockwood@alconlabs.com>
    Translate
    22-Sapphire I
    Jun 19, 2012 11:17 PM UTC
    This mapkey seems to work perfectly to backup the current file (File, Backup), writing to the "V" network drive.

    mapkey $F1 @MAPKEY_LABELMonitor;~ Command `ProCmdModelBackup` ;\
    mapkey(continued) ~ Move `file_saveas` `file_saveas`2 9.783133 5.060241 ;\
    mapkey(continued) ~ Select `file_saveas` `Location Browser`;\
    mapkey(continued) ~ Close `file_saveas` `Location Browser`;\
    mapkey(continued) ~ Activate `file_saveas` `M_pfafs:drives`;\
    mapkey(continued) ~ Close `file_saveas` `Location Browser`;\
    mapkey(continued) ~ Select `file_saveas` `ph_list.Filelist`1 `v:`;\
    mapkey(continued) ~ Activate `file_saveas` `ph_list.Filelist`1 `v:`;\
    mapkey(continued) ~ Select `file_saveas` `ph_list.Filelist`1 `4_Misc`;\
    mapkey(continued) ~ Activate `file_saveas` `ph_list.Filelist`1 `4_Misc`;\
    mapkey(continued) ~ Select `file_saveas` `ph_list.Filelist`1 `Mike`;\
    mapkey(continued) ~ Activate `file_saveas` `ph_list.Filelist`1 `Mike`;\
    mapkey(continued) ~ Activate `file_saveas` `OK`;

    [cid:image001.png@01CD4E36.F9190760]

    Seems that some code could be added to identify the mapkey name, instead of actually backing up the file - I just used that to see the result of writing to a network drive from within Pro/E.

    From: Lance J Lie [

    2000 E. El Segundo Blvd.
    El Segundo, CA 90245 USA
    www.raytheon.com

    From: "Lockwood,Mike,IRVINE,R&D" <mike.lockwood@alconlabs.com>
    Translate
    TomU
    23-Emerald IV
    Jun 20, 2012 11:59 AM UTC
    There was a thread back in January on this exact same subject. There seemed to be two basic approaches. 1.) Pass the name of the mapkey to a batch file at the beginning of each mapkey and let the batch file do the logging, or 2.) create a custom logging command in J-Link and then make sure that command is added to the beginning of every mapkey.

    Tom U.
    Translate