Author Topic: Save .vsd as .vsdx breaks Last Edit Date in Visio 2016  (Read 740 times)

0 Members and 1 Guest are viewing this topic.

Anondood

  • Newbie
  • *
  • Posts: 9
Save .vsd as .vsdx breaks Last Edit Date in Visio 2016
« on: April 14, 2020, 03:48:38 PM »
If I add a Last Edit Date field to an existing .vsd drawing it works as expected.

If I then save that drawing as a .vsdx, Last Edit Date shows the current time when the file is opened.

This only happens with pre-existing .vsd files.
I tried saving a 2016 file with a Last Edit Date field as .vsd (worked fine) and then saved as .vsdx (still worked fine).

I have hundreds of files that will eventually need to be updated to .vsdx.

Help! :'(


Surrogate

  • Hero Member
  • *****
  • Posts: 987
    • ShapeSheet™ Knowledge Base
Re: Save .vsd as .vsdx breaks Last Edit Date in Visio 2016
« Reply #1 on: April 14, 2020, 04:15:04 PM »
 Where is a bug in this issue?
« Last Edit: April 14, 2020, 04:17:11 PM by Surrogate »

vojo

  • Hero Member
  • *****
  • Posts: 1476
Re: Save .vsd as .vsdx breaks Last Edit Date in Visio 2016
« Reply #2 on: April 14, 2020, 11:04:16 PM »
last edit date needs to be a discrete / manual value....not a function like NOW().
When opening a file, that function wil update to current time.

All MS products work that way

one way you could do this in shapesheet is

user.now = NOW()
actions.updateLED = setf(getref(actions.updateLED.checked),if(actions.updateLED.checked,0,1))
actions.updateLED.tag ="update last edit date"

user.LED = if (actions.updateLED.checked, user.now, NA)

use the user.LED as the cell for the field to be displayed.

right click shape...select the "update last edit date"....will see checked and value update.
repeat and deselect to turn off (otherwise the same problem again).

Anondood

  • Newbie
  • *
  • Posts: 9
Re: Save .vsd as .vsdx breaks Last Edit Date in Visio 2016
« Reply #3 on: April 15, 2020, 07:07:29 AM »
With my original .vsd file, after I add the Last Edit Date field it always shows the last time it was edited even if I open and close it 10 times on different days it always shows the last time it was EDITED. and not the current time.

The same behavior happens when I put a Last Edit Date field in a .vsdx.
This is all "as expected".

But if I save a .vsd as a .vsdx, the Last Edit Date field then ALWAYS shows the time the file was OPENED, even if the last edit was days ago.

Paul Herber

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2892
    • Paul Herber's website
Re: Save .vsd as .vsdx breaks Last Edit Date in Visio 2016
« Reply #4 on: April 15, 2020, 07:55:22 AM »
What field name are you using?
Have you tried =DOCLASTSAVE() instead of =DOCLASTEDIT() ?
I suspect Visio is writing something in the document when it is opened.

Electronic and Electrical engineering, business and software stencils and applications for Visio -

https://www.paulherber.co.uk/

Anondood

  • Newbie
  • *
  • Posts: 9
Re: Save .vsd as .vsdx breaks Last Edit Date in Visio 2016
« Reply #5 on: April 15, 2020, 09:13:51 AM »
From the Menu Bar:

Insert>>Field>>Date/Time>>Last Edit Date/Time

Surrogate

  • Hero Member
  • *****
  • Posts: 987
    • ShapeSheet™ Knowledge Base
Re: Save .vsd as .vsdx breaks Last Edit Date in Visio 2016
« Reply #6 on: April 15, 2020, 09:52:13 AM »
From the Menu Bar:

Insert>>Field>>Date/Time>>Last Edit Date/Time
i.e. DOCLASTEDIT
« Last Edit: April 15, 2020, 09:55:25 AM by Surrogate »

Anondood

  • Newbie
  • *
  • Posts: 9
Re: Save .vsd as .vsdx breaks Last Edit Date in Visio 2016
« Reply #7 on: April 15, 2020, 10:28:05 AM »
And how would I put that field in my drawing?

Macros, VBA, etc. are blocked in my environment.

vojo

  • Hero Member
  • *****
  • Posts: 1476
Re: Save .vsd as .vsdx breaks Last Edit Date in Visio 2016
« Reply #8 on: April 15, 2020, 12:44:30 PM »
in shapesheet, where ever the cell you are using in the field insertion....put that command

for example
insert==>field ==>cells ==>user.mydate
user.mydate = DOCLASTEDIT()

if you don't know shapesheet….do some google
to open, in advanced options on file panel....set enable developer mode, save.....rt click shape.

Anondood

  • Newbie
  • *
  • Posts: 9
Re: Save .vsd as .vsdx breaks Last Edit Date in Visio 2016
« Reply #9 on: April 15, 2020, 01:06:23 PM »
When I look at the shapesheet for the .vsdx that DOESN'T work, it is already set to =DOCLASTEDIT().
The shapesheet for the original .vsd with Last Edit Date inserted is identical.

I still need to know why:
original .vsd with Last Edit Date works
original .vsdx with Last Edit Date works
.vsd converted from .vsdx works

ONLY original.vsd converted to .vsdx doesn't work

Surrogate

  • Hero Member
  • *****
  • Posts: 987
    • ShapeSheet™ Knowledge Base
Re: Save .vsd as .vsdx breaks Last Edit Date in Visio 2016
« Reply #10 on: April 15, 2020, 01:19:45 PM »
Strange in this thread mentioned another issue: dont updated value of FILENAME function.

Anondood

  • Newbie
  • *
  • Posts: 9
Re: Save .vsd as .vsdx breaks Last Edit Date in Visio 2016
« Reply #11 on: April 16, 2020, 11:29:24 AM »
I am actually adding a FILENAME field also, but it seems to work fine after the conversion.

vojo

  • Hero Member
  • *****
  • Posts: 1476
Re: Save .vsd as .vsdx breaks Last Edit Date in Visio 2016
« Reply #12 on: April 16, 2020, 06:06:39 PM »
just a guess, but the conversion probably saves the new file and thus updated.   I think you really need a trigger to prevent update until you want it.  Otherwise, every time you edit, that field will get updated

Anondood

  • Newbie
  • *
  • Posts: 9
Re: Save .vsd as .vsdx breaks Last Edit Date in Visio 2016
« Reply #13 on: April 17, 2020, 07:11:44 AM »
I WANT the field to get updated every time I edit.
I DON'T want the field to update every time I view it.

Seems simple enough, and it works as expected on everything EXCEPT converted files.

vojo

  • Hero Member
  • *****
  • Posts: 1476
Re: Save .vsd as .vsdx breaks Last Edit Date in Visio 2016
« Reply #14 on: April 17, 2020, 11:04:08 AM »
does a file after conversion behave correctly on the 2nd 3rd 4th time you edit?
if true, reinforces the idea conversion is about creating a new file...thus updated field