325 Reputation

3 Badges

1 years, 208 days

MaplePrimes Activity

These are replies submitted by Anthrazit


Thanks for the additional solution, nice to know.


The problem is that what if the string you search for exists at least twice, and you want the second one.

Found out by chance that my entry finally was accepted.

But that leads to a new question - how do I post updates?

I have to add that I have uploaded my workbook into 3 different groups - private, public and my companies. It seems that just one of them can be updated, I assume the last one that was uploaded to.

The other groups allow just to do a "publish a copy", which means, a new entry.

Would it be possible to do updates to the other groups as well - probably in the future?

Just got a reply from Maplesoft support, that the problem is due to a whitespace in the xml file.

Here's from the reply:

After reviewing this with our second level support team they confirmed that your XML document contained whitespace. It is this whitespace that Maple was interpreting as the first child.

We recommend using the CleanXML(..)​ function after importing an XML document. This removes content consisting only of whitespace, as well as XML comment structures from an XML tree data structure. The return value is a cleaned XML tree data structure.

Found also that one on the internet.

As the code generated was formatted by Maple during writeout, there still might be a possible bug during the writeout.

See also:


Confirmed bug by Maplesoft.

@Carl Love @itsme 

We have a bunch of software programs in our office, and NONE behaves like Maple in that way.

This behaviour is totally unacceptable from our side.

Some software programs like Office lock a file by the operating system, some others implement their own locking mechanism. The usual way is to create a .lck file in the same directory as the file itself, with the information about who locked the file and when.


I admit that's a solution, but it's more a workaround actually.

E.g. you go around the XMLTools definition of the XMLProcessingInstructions and define your own.

I'd prefer if the WriteFile command either exports the XML in a more readable form, or has a switch to do so. All the code is already implemented in the Print functions.

@Mac Dude 

As far as I can see now, a file based approach seems to be most promising.

There are at least 2 packages available for Maple that look interesting - JSON and XML.

I've never used any of those formats myself in a self written program, but what do you think about using them? I've actually also looked into IFC, which is an exchange format for buildings, but this looks a bit complicated and there is no package available in Maple yet.


Very good questions indeed.

What I have in mind, is the following situasjon.

Currently we are building up a set of calculation sheets for structural building designs, which mainly consists of a set of workbooks for the different materials (steel, concrete, timber). This workbooks calculate the design resistance of the different materials.

In addition we are doing the same thing for sections as well, where specific section data needs to be calculated.

On the other hand I've done a workbook which calculates the forces (shear forces, moments) and deflections.

I need to get over a set of specific data from the material side to the calculation side already (stiffness data, modulus of elasticity). But later on I will also need to transfer some calculation results (maximum and minimum moments, deflections) back to the material design to do the verification of the capacity.

Of course I could simply implement the whole bunch of calculation and dimensioning in one workbook, but I think that's not a good idea.

I like the idea of keeping things apart, and just transfer the necessary data.

One principle I'd like to follow is that the calculating worksheet/program itself decides which data is good for further processing, and make that available.

@Carl Love 

While I appreciate the idea, it seems a bit risky to me. In general I'd like to exchange data between specific sheets, and not all that are open at the moment.

Any other methods, like file based or copy/paste?


I tried to find what a single "Do" statement does, but the only reference to "do" was in a for...while clause.


Thanks a lot for the explanation and the solution.

Probably interesting why I came up with the way I did that.

As far as I can remember, it was a copy paste operation from document mode. While a direct definition gets what you have (Unit('kN'*'m')), the result of a product of a force and a length keeps the units apart. But that does just apply to when you don't use the Units package. If you use the Units package, it will give you Joule as a unit.

Still not done with the problem, I'm opening a new thread.

@Carl Love

I think I've fixed it.

And the reason is connected to the problem you have described - though in the oppositve way. And I think actually your first sentence is wrong.

The main problem was that I loaded the Units package by using "with Units" - which loads the Units:-Simple package. The units Simple package apparently does NOT replace the basic arithmetic operations, or it doesn't do it good enough.

But when I changed the init procedure by using "with Units[Standard]" the error suddenly disappears and it seems to work now.

Somehow Maple thinks that there are still units in the matrix, even if i dropped them - but that will be something for Maplesoft to have a look into. I've filed a case on that issue. 

2 3 4 5 6 7 8 Page 4 of 10