Code Monkey home page Code Monkey logo

version3's Introduction

Introduction

This project is Version 3 of the Chemistry for Word Add-In

This version is now obsolete, please use V3.2

Code of Conduct

This project has adopted the code of conduct defined by the Contributor Covenant to clarify expected behavior in our community.
For more information see the .NET Foundation Code of Conduct.

Getting Started

  1. Installation process
  2. Software dependencies Office 2010/2013/2016
  3. Latest releases

Build and Test

Builds, testing and release processes are defined in each of the individual areas. Any required processes will listed here.

Contribute

Please feel free to contribute to the project. Create your own branch, make your changes then create a Pull Request to initiate a merge into the master branch.

.NET Foundation

This project is supported by the .NET Foundation.

version3's People

Contributors

deadlyvices avatar dependabot[bot] avatar mikewilliams-uk avatar wydna avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

version3's Issues

Silent Install Option

I work at a school and have Math faculty requesting this. It would be nice if there were a silent install option (or if there is one, it could be documented!), so that we could deploy this to all of our lab computers.

For the time being, I'm deploying it via system center, but the users will have to click through the install themselves.

Thanks!

This program is blocked by group policy. For more information, contact your system administrator

Within the automatic update detection form
When the user clicks on "Update Now" they may see a message like one of these :-

  • "This program is blocked by group policy. For more information, contact your system administrator."
  • "Access is denied"

This is happening because the user's anti virus system is detecting our auto update mechanism as an intrusion and blocking it.

Unfortunately we can't do anything about this, you will need to contact your system administrator.

Series does not contain a matching element in OoXml rendering

We have determined that with certain structures the following exception can occur.

System.InvalidOperationException: Series does not contain a matching element
 at System.Linq.Enumerable.First[TSource](IEnumerable`1 source, Func`2 predicate)
 at Chem4Word.Model.Bond.VectorOnSideOfNonHAtomFromStartLigands(Atom startAtom, Atom endAtom, IEnumerable`1 startLigands) in C:\Dev\vsts\chem4word\Version3\src\Chemistry\Chem4Word.Model\Bond.cs:line 686
 at Chem4Word.Model.Bond.GetPrettyDoubleBondVector() in C:\Dev\vsts\chem4word\Version3\src\Chemistry\Chem4Word.Model\Bond.cs:line 559
 at Chem4Word.Model.Bond.GetPlacement() in C:\Dev\vsts\chem4word\Version3\src\Chemistry\Chem4Word.Model\Bond.cs:line 424
 at Chem4Word.Model.Bond.get_ImplicitPlacement() in C:\Dev\vsts\chem4word\Version3\src\Chemistry\Chem4Word.Model\Bond.cs:line 406
 at Chem4Word.Model.Bond.get_Placement() in C:\Dev\vsts\chem4word\Version3\src\Chemistry\Chem4Word.Model\Bond.cs:line 374
 at Chem4Word.Renderer.OoXmlV3.OOXML.Bonds.BondLinePositioner.CreateLines(Bond bond) in C:\Dev\vsts\chem4word\Version3\src\PlugIns\Renderers\OoXmlV3\OOXML\Bonds\BondLinePositioner.cs:line 152
 at Chem4Word.Renderer.OoXmlV3.OOXML.OoXmlRenderer.ProcessBonds(Molecule mol, Progress pb, Int32 moleculeNo) in C:\Dev\vsts\chem4word\Version3\src\PlugIns\Renderers\OoXmlV3\OOXML\OoXmlRenderer.cs:line 633
 at Chem4Word.Renderer.OoXmlV3.OOXML.OoXmlRenderer.GenerateRun() in C:\Dev\vsts\chem4word\Version3\src\PlugIns\Renderers\OoXmlV3\OOXML\OoXmlRenderer.cs:line 169
 at Chem4Word.Renderer.OoXmlV3.OOXML.OoXmlFile.AddPictureFromModel(Body docbody, Model model, String bookmarkName, Options options, IChem4WordTelemetry telemetry, Point topLeft) in C:\Dev\vsts\chem4word\Version3\src\PlugIns\Renderers\OoXmlV3\OOXML\OoXmlFile.cs:line 106
 at Chem4Word.Renderer.OoXmlV3.OOXML.OoXmlFile.CreateFromCml(String cml, String guid, Options options, IChem4WordTelemetry telemetry, Point topLeft) in C:\Dev\vsts\chem4word\Version3\src\PlugIns\Renderers\OoXmlV3\OOXML\OoXmlFile.cs:line 69
 at Chem4Word.Renderer.OoXmlV3.Renderer.Render() in C:\Dev\vsts\chem4word\Version3\src\PlugIns\Renderers\OoXmlV3\Renderer.cs:line 130

This has been narrowed down to an error in the Linq used.
.First(...) has been changed to .FirstOrDefault(...) with the possibility of null handled

Chem4Word not running

Describe the bug
In summary, I do not know why the registry keys are not being re-added to the registry when i try use the repair feature in the setup, but for this reason i cannot reinstall the Chem4Word plugin

To Reproduce
Steps to reproduce the behavior:

  1. Go to downloaded setup.exe file for Chem4Word
  2. Run Setup
  3. Click 'Repair'
  4. Load Word, and the chemistry tab doesn't appear anymore

Expected behavior
the chemistry tab should appear and the addin should work as expected

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • Windows 10
  • Word 2016

Additional context

  • I deleted Chem4Word manually by deleting files and registry edits as specified by the Chem4Word Website
  • I tried to reinstall, but registry keys were not reinstalled
  • As a result, Chem4Word plugin did not load in/work

UPDATE: I (somewhat) fixed it by downloading Chem4Word on a different PC, then extracting and importing the registry keys into my PC's registry, which allowed the plugin to work. However, when I notice now that if I try to remove then repair the files, the registry keys are deleted then never reinstalled, meaning that I would have to manually re-add the registry keys. Is there a more permanent solution?

Hello, a couple days ago I deleted the chem4word manually using the steps on the website (because I didnt know it could do so automatically). Now i'm trying to reinstall it, but it won't work. When I checked through the files, they had downloaded into their folders, except for the folder located in 'AppData>Local', which did not contain the Chem4WordV3 folder after the reinstall. Also, the registry edits weren't reinstalled. What do I do in this situation? I tried running the setup over and over again and it did nothing (in hindsight I should have backed up my registry)

script error

When I click on draw molecule, a script error appears.
  What should I do?

Could not load file or assembly System.Data.dll

This error is caused by an missing file (which is part of the .Net Framework) on your computer.

It most likely happened durung the un-installation of another program, which has incorrecltly removed the file.

Microsoft have a tool which should be able to repair your installed version of the .Net Framework.

This can be downloaded from https://www.microsoft.com/en-gb/download/confirmation.aspx?id=30135

Exception

Could not load file or assembly 'System.Data.dll' or one of its dependencies. A dynamic link library (DLL) initialization routine failed.
at Newtonsoft.Json.Converters.BinaryConverter.CanConvert(Type objectType)
at Newtonsoft.Json.JsonSerializer.GetMatchingConverter(IList`1 converters, Type objectType)
at Newtonsoft.Json.Serialization.DefaultContractResolver.InitializeContract(JsonContract contract)
at Newtonsoft.Json.Serialization.DefaultContractResolver.CreateObjectContract(Type objectType)
at Newtonsoft.Json.Serialization.DefaultContractResolver.CreateContract(Type objectType)
at Newtonsoft.Json.Serialization.DefaultContractResolver.ResolveContract(Type type)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value)
at Chem4Word.Chem4WordV3.LoadOptions() in C:\Dev\vso\chem4word\Version3\src\Chem4Word.V3\Chem4WordV3.cs

UnauthorizedAccessException when Editing Structure

The form which allows a user to edit a structure uses an ActiveX control to start an embedded version of Internet Explorer (IE).

If Internet Explorer is not registered properly the exception shown below can occur.

As this is an issue which is external to Chem4Word, we are unable to fix this.
Please try to repair your installation of Internet Explorer [11]

Editor.ChemDoodleWeb800.WpfChemDoodle.WpfChemDoodle_OnLoaded()
Exception
System.UnauthorizedAccessException: The COM class generator could not be retrieved for the component with CLSID {8856F961-340A-11D0-A96B-00C04FD705A2} due to the following error: 80070005 Access denied. (Exception of HRESULT: 0x80070005 (E_ACCESSDENIED)).
 at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
 at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
 at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
 at System.Activator.CreateInstance(Type type, Boolean nonPublic)
 at System.Activator.CreateInstance(Type type)
 at System.Windows.Controls.WebBrowser.WebOCHostingAdaptor.CreateWebOC()
 at System.Windows.Controls.WebBrowser.CreateActiveXObject(Guid clsid)
 at System.Windows.Interop.ActiveXHost.TransitionFromPassiveToLoaded()
 at System.Windows.Interop.ActiveXHost.TransitionUpTo(ActiveXState state)
 at System.Windows.Controls.WebBrowser.get_AxIWebBrowser2()
 at System.Windows.Controls.WebBrowser.DoNavigate(Uri source, Object& targetFrameName, Object& postData, Object& headers, Boolean ignoreEscaping)
 at System.Windows.Controls.WebBrowser.Navigate(String source)
 at Chem4Word.Editor.ChemDoodleWeb800.WpfChemDoodle.LoadCdw() in C:\Dev\vsts\chem4word\Version3\src\PlugIns\Editors\ChemDoodleWeb.800\WpfChemDoodle.xaml.cs:líne 510
 at Chem4Word.Editor.ChemDoodleWeb800.WpfChemDoodle.WpfChemDoodle_OnLoaded(Object sender, RoutedEventArgs e) in C:\Dev\vsts\chem4word\Version3\src\PlugIns\Editors\ChemDoodleWeb.800\WpfChemDoodle.xaml.cs:líne 90

Chem4Word Inactive

Greetings

I Installed C4W and received no install errors. However, when word is launched the menu is entirely grayed out with the exception of the Options & Help buttons. De-activating and re-activating the add-in has no effect. I uninstalled and reinstalled also with no effect. I rebooted the machine with no effect. Attached is the install log

2018-02-15.log

I also installed C4W on a duplicate set of hardware with no difficulties.

The machines in question are both Dell T7500, Dual Xeon, 12Gb Ram running Win7-Pro-64.

Thoughts on what to do?

Sincerely Paul

* at Line {n} is not a valid Element

Although reported as an exception, this is caused by data which is not understood by Chem4Word version 3

`Searcher.ChEBIPlugin.SearchChEBI.UpdateDisplay()

  • at Line 27 is not a valid Element    5.7310   -6.0809    0.0000 *   0  0  0  0  0  0  0  0  0  0  0  0

  • at Line 28 is not a valid Element   15.3683   -5.6917    0.0000 *   0  0  0  0  0  0  0  0  0  0  0  0`

  • is being used to signify a wild card atom

Erroneous formula calculation (Caffeine)

Describe the bug
The plugin calculates an incorrect formula for caffeine.

To Reproduce
Steps to reproduce the behaviour:

  1. Go to Chemistry tab
  2. Click on Draw
  3. Draw caffeine molecule
  4. Click on Edit Labels
    Expected behavior
    Chem4Word: ResolvedFormula should read C8H10N4O2
    Screenshots

image

Desktop (please complete the following information):

  • OS: Windows 10 enterpise
  • Word Version 2019 Professional

Additional context
Add any other context about the problem here.

Updates available screen shown too often

A disable auto-update option should be made available.
I have searched trough the registry and the Chem4Word.V3.json settings file but no such option is available,
This proves to be quite an issue as some people prefer to update to each version manually and the pop-up that shows at each run tends to get in the way for those people.

Thanks for the time and understanding!

Sequence contains no elements in CustomRibbon Edit

Line 724 of CustomRibbon.PerformEdit() in Chem4WordRibbon.cs

int maxAtomicNumber = mol.Atoms.Max(x => ((Element)x.Element).AtomicNumber);

Add test to ensure that at least one atom exists in molecule.

Exception

System.InvalidOperationException: Sequence contains no elements
at System.Linq.Enumerable.Max(IEnumerable`1 source)
at System.Linq.Enumerable.Max[TSource](IEnumerable`1 source, Func`2 selector)
at Chem4Word.CustomRibbon.PerformEdit()
in C:\Dev\vsts\chem4word\Version3\src\Chem4Word.V3\Ribbon\Chem4WordRibbon.cs:line 724

Error installing VSTO; ExitCode: 1603

Describe the bug
A clear and concise description [in English] of what the bug is.

To Reproduce
Steps to reproduce the behaviour:

  1. Go to 'https://github.com/Chem4Word/Version3/releases/tag/V3.0.33' and download the "Chem4Word-Setup.exe"
  2. Click on 'Chem4Word-Setup.exe' and after executed this software started installation and during installation process it was returned "Error installing VSTO; ExitCode: 1603"

Expected behavior
A clear and concise description [in English] of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows 10 Professional
  • Word Version 2016 Professional Plus

Additional context
Add any other context about the problem here.
error message

Exception: System.NullReferenceException in Editor.ChemDoodleWeb800

Some users are seeing this Exception

Editor.ChemDoodleWeb800.WpfChemDoodle.SwitchToMulti_OnClick()

Exception	
System.NullReferenceException: Object reference not set to an instance of an object.
 at Chem4Word.Model.Converters.Json.JSONConverter.AddMolecule(Object data, Model newModel) in C:\Dev\vsts\chem4word\Version3\src\Chemistry\Chem4Word.Model\Converters\Json\JSONConverter.cs:line 171
 at Chem4Word.Model.Converters.Json.JSONConverter.Import(Object data) in C:\Dev\vsts\chem4word\Version3\src\Chemistry\Chem4Word.Model\Converters\Json\JSONConverter.cs:line 160
 at Chem4Word.Editor.ChemDoodleWeb800.WpfChemDoodle.SwitchToMulti_OnClick(Object sender, RoutedEventArgs e) in C:\Dev\vsts\chem4word\Version3\src\PlugIns\Editors\ChemDoodleWeb.800\WpfChemDoodle.xaml.cs:line 422

in JSONConverter.cs at line 171 change

foreach (AtomJSON a in data.a)
{
}

To

if (data.a != null)
{
  foreach (AtomJSON a in data.a)
  {
  }
}

Could not load file or assembly System.Data.SQLite

We are seeing a few instances of the following Exception.
We are unable to reporoduce it and believe it to be caused by another instance with a different version number loaded into the system memory.

Could not load file or assembly 'System.Data.SQLite, Version=1.0.109.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139' or one of its dependencies. The system cannot find the file specified.

Can anyone shed some light on how this issue might be fixed.

Exception: The file or directory is corrupted and unreadable

Exception: The file or directory is corrupted and unreadable.

This seems to be happening if the user's profile folder is read only.
It has also been seen sometimes when the profile is mapped to a network drive.

The file or directory is corrupted and unreadable
  at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
  at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
  at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
  at System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost)
  at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost)
  at System.IO.File.InternalWriteAllText(String path, String contents, Encoding encoding, Boolean checkHost)
  at System.IO.File.WriteAllText(String path, String contents)
  at Chem4Word.Chem4WordV3.LoadOptions() in C:\Dev\vsts\chem4word\Version3\src\Chem4Word.V3\Chem4WordV3.cs:line 345

Error occur

When i double-clicked in chemistry structure to edit, the notifitication appear “can’t edit chemistry here because selection contains more than just a content control”. What should i do?

HandleRightClick(); The requested member of the collection does not exist.

HandleRightClick()
The following code should handle case where sentence is not present (not sure why this would happen)

for (int i = 1; i <= sel.Sentences.Count; i++)
{
   var sentence = sel.Sentences[i];
}

Exception

The requested member of the collection does not exist.
System.Runtime.InteropServices.COMException (0x800A1735): The requested member of the collection does not exist.
   at Microsoft.Office.Interop.Word.Sentences.get_Item(Int32 Index)
   at Chem4Word.Chem4WordV3.HandleRightClick(Selection sel) in C:\Dev\vso\chem4word\Version3\src\Chem4Word.V3\Chem4WordV3.cs

Scaling Issues on High Resolution Monitor

Describe the bug
The add-on is scaled extremely small and it is hard for me to read clearly what the buttons on the top of the interface are.

To Reproduce
Steps to reproduce the behavior:

  1. Change native screen resolution to 3840 x 2160 and Scale and Layout to 250%.
  2. Click on the Chemistry Ribbon
  3. Click on "Edit"
  4. See screenshots below

Expected behavior
The menu and editing screen has consistent, readable scaling.

Screenshots
Annotation 2019-12-10 200609
Annotation 2019-12-10 200609 - Edit Labels

Desktop (please complete the following information):

  • OS: Windows 10 Home Version 1909
  • Microsoft Word Office 365 Version 1911

SMILES helper

Hi, I want to convert structures to SMILES format and show in Word. The problem was when I imported sdf structures from the Import icon, the 2D structures could not be shown as SMILES at the same time when I clicked the Show As icon. It seemed the imported structures were deposited in the same object. Any advices would be helpful, thank you !

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.