Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Structure cannot be seen in ACME #47

Closed
tomyan112 opened this issue Mar 6, 2020 · 10 comments
Closed

Structure cannot be seen in ACME #47

tomyan112 opened this issue Mar 6, 2020 · 10 comments

Comments

@tomyan112
Copy link

https://youtu.be/fyAeJGoWaOQ
The problematic file has been sent to your email.

@MikeWilliams-UK
Copy link
Contributor

Thanks is it JUST the file that you have sent?

@MikeWilliams-UK
Copy link
Contributor

@tomyan112 please confirm which version of Chem4Word.

@MikeWilliams-UK
Copy link
Contributor

@tomyan112 no document has come through. Not even in spam folder!

Can you please send the document to [email protected] again?

@MikeWilliams-UK
Copy link
Contributor

@tomyan112 is this a file in which you have been "tinkering" with the ContentControls?

If so you may have accidentally broken the link between the ContentControl and the stored chemistry.

A ContentControl has many properties the two main ones which we use are:

  • Title - This is set to the string "Chemistry" and is used to detect if it holds chemistry.
  • Tag - This stores the internal (to a document) identifier of the chemistry which is stored in a well documented but hidden section of a document called CustomXmlParts. When in 1D mode ("Show As" button) it also stores a prefix of which 1D label is being displayed.

The cml in the CustomXmlParts has the following extra element to allow us to find the chemistry linked to the ContentControl

<c4w:customXmlPartGuid>cf188ff717bf42788c582874a02c4602</c4w:customXmlPartGuid>

I have just done an experiment where I changed the guid in the tag to a non-existent one and I get the same blank edit screen. Just as in your video.

If the document has been saved in this invalid state the real chemistry will have been purged from the document. We remove any unused CustomXmlParts on save to ensure that the word document does not get bloated with orphaned ones.

@MikeWilliams-UK MikeWilliams-UK added the Waiting for Answer Waiting for an answer from someone outside the project team label Mar 6, 2020
@deadlyvices
Copy link
Contributor

Does it appear the Navigator? If not then the link is broken between the control and the chemistry. You then have an orphaned control

@tomyan112
Copy link
Author

@tomyan112 is this a file in which you have been "tinkering" with the ContentControls?

If so you may have accidentally broken the link between the ContentControl and the stored chemistry.

A ContentControl has many properties the two main ones which we use are:

  • Title - This is set to the string "Chemistry" and is used to detect if it holds chemistry.
  • Tag - This stores the internal (to a document) identifier of the chemistry which is stored in a well documented but hidden section of a document called CustomXmlParts. When in 1D mode ("Show As" button) it also stores a prefix of which 1D label is being displayed.

The cml in the CustomXmlParts has the following extra element to allow us to find the chemistry linked to the ContentControl

<c4w:customXmlPartGuid>cf188ff717bf42788c582874a02c4602</c4w:customXmlPartGuid>

I have just done an experiment where I changed the guid in the tag to a non-existent one and I get the same blank edit screen. Just as in your video.

If the document has been saved in this invalid state the real chemistry will have been purged from the document. We remove any unused CustomXmlParts on save to ensure that the word document does not get bloated with orphaned ones.

I first removed content control, and then tinkering around, then ctrl+z.

@MikeWilliams-UK
Copy link
Contributor

A) This is one of the main reasons we advise against tinkering with the ContentControl as we can't guarantee that Word's undo system will repair the connection.

B) If you open the navigator, you will be able to see all linked Chemistry in the document.
When you click on a structure in the navigator the Chemistry will be selected. If there are multiple linked copies of it the arrow icons will allow you to navigate between them.

@MikeWilliams-UK
Copy link
Contributor

Thanks @tomyan112 I have just received the document.
I will examine it today to see if it can be repaired.

@MikeWilliams-UK MikeWilliams-UK removed the Waiting for Answer Waiting for an answer from someone outside the project team label Mar 7, 2020
@MikeWilliams-UK
Copy link
Contributor

@tomyan112 I have just confirmed using the navigator that the structure in question is not linked to any CustomXmlPart which is present in the document.

I forgot to mention earlier, that the navigator operation is bi-directional.
Not only can you select structures in the navigator to find them in the document, but you can also click on a structure to find it in the navigator.

When I click on the offending structure in the document no structure is selected in the navigator.

@MikeWilliams-UK
Copy link
Contributor

@tomyan112 sorry, but we are unable to fix your document.
As this issue is caused by "tinkering" with the document I am going to close this issue.

As we can detect the condition I am going to issue a warning and prevent empty editor being shown.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants