Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Login


3 Pages123>
Options
Go to last post Go to first unread
Offline reselty  
#1 Posted : 03 May 2016 19:44:02(UTC)
reselty


Rank: Member

Groups: Registered
Joined: 03/05/2016(UTC)
Posts: 20
Switzerland

Hi

I can use a MathCAD15 for 3 Month.
So I will use this time to convert all my mcd MathCAD2000 files to SMath.

Do anyone have an Idea how to do followong as a bach/macro Job:

Open mcd File in MathCad15
Create full-page pdf (best: one page)
Save as xmcd
Open this in SMath
Save as: sm

Would be also nice when they could stay in the original file structure...but no idea how about that...!

Found following programms, but never did something like this and have no idea:
RunCmd 160108
BatchRun
Makro 160108
AutoIt
MacroMaker

Cause of conversion problems I would save a proper pdf of the original.
Perhaps someone will say better do that via MathCAD2000 than in 15 about problems doing that - please let me know.

Every idea would be nice!
Thanks a lot for feedback!

Reselty

Edited by moderator 03 May 2016 21:39:27(UTC)  | Reason: title updated

Wanna join the discussion?! Login to your SMath Studio Forum forum account. New Registrations are disabled.

Offline Davide Carpi  
#2 Posted : 03 May 2016 20:07:06(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,647
Man
Italy
Location: Italy

Was thanked: 1329 time(s) in 875 post(s)
From SMath Studio side you can use the -e command:

Code:
smathstudio_desktop.exe -silent -e .sm "filename.xmcd"


supported commands and syntax are listed here in the wiki;

This is an example of use provided by the author for conversion from *.sm to *.png, with little modifications can be used to convert from xmcd to sm:

Originally Posted by: Andrey Ivashov Go to Quoted Post
here is a *.bat file content which converts all files in folder from .sm to .png:
Code:
@echo off
for %%a in ("C:\examples\*") do call:convert %%a
exit/b

:convert
call "C:\Program Files (x86)\SMath Studio\SMathStudio_Desktop.exe" -silent -e .png %*


For the Mathcad side, I don't know. Maybe someone of the Mathcad users active here may help you. Good

Edited by user 03 May 2016 20:28:17(UTC)  | Reason: Not specified

If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
Offline reselty  
#3 Posted : 03 May 2016 22:19:14(UTC)
reselty


Rank: Member

Groups: Registered
Joined: 03/05/2016(UTC)
Posts: 20
Switzerland

Thank you first - i'll try it !!!
Never wrote a batch - but think will mean:
-write in notepad and save as *.bat?
-only this small changing?:
++++++++++++++++++
@echo off
for %%a in ("C:\examples\*"Wink do call:convert %%a
exit/b

:convert
call "C:\Program Files (x86)\SMath Studio\SMathStudio_Desktop.exe" -silent -e .sm %*
++++++++++++++++++

And yes, I hope someone else will answer for the mcd to xmcd convertion too..
Thanks again
Reselty
Offline Davide Carpi  
#4 Posted : 04 May 2016 02:05:04(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,647
Man
Italy
Location: Italy

Was thanked: 1329 time(s) in 875 post(s)
True, sorry if I've forget to mention it. The text must be placed in a txt file and then renamed from *.txt to *.bat Good
You can modify also the target path and the executable path (if needed);

Below the script updated and tested... notice that I've wrapped %%f with double quotes at the end of the 3rd line (this is to ensure results even if the path contains whitespaces)

Code:
@echo off
:: replace 'C:\examples\' with the path that contains the files to convert; don't forget \* at the end
for %%f in ("C:\examples\*") do call:convert "%%f"
exit/b

:convert
:: replace .sm with the desired file type extension (must be supported in the "Save as..." dialog of SMath Studio)
call "C:\Program Files (x86)\SMath Studio\SMathStudio_Desktop.exe" -silent -e .sm %*


I've googled for the batch pdf printing from Mathcad, I've found this solution (look at the last post); basically seems you have to set the pdf printer as default and then use another script like the one above (not tested).

Code:
@echo off
:: replace 'C:\examples\' with the path that contains the files to print; don't forget \* at the end
for %%f in ("C:\examples\*") do call:printfile "%%f"
exit/b

:printfile
:: replace PATH_TO_MATHCAD_EXE with a valid path to the mathcad executable
call "PATH_TO_MATHCAD_EXE\mathcad.exe" -p %*

Edited by user 04 May 2016 02:17:51(UTC)  | Reason: Not specified

If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
thanks 1 user thanked Davide Carpi for this useful post.
on 09/05/2016(UTC)
Offline Jean Giraud  
#5 Posted : 04 May 2016 06:23:36(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Originally Posted by: reselty Go to Quoted Post
I can use a MathCAD15 for 3 Months.
So I will use this time to convert all my mcd MathCAD2000 files to SMath.


If you own Mathcad 2000, you have the CD. If you can use Mathcad 15 for 3 months
you don't have the CD, just a downloaded version. If you install 15, you may not be
ble to re-install 2000. If I would be you, I would purchase a new PC to run 15.
The warflame started between PTC and myself at PTC Mathcad 14 [no more a Mathsoft
product anymore], my Mathcad work sheets 11.2a crashed PTC at their head office,
or could not read.
_________________________________________________

From: Zeftel, Mona [.......@ptc.com]
Sent: February 16, 2009 3:36 PM
To: jm giraud
Subject: RE: MATHCAD for Engineers_Fit methods

Hello Jean,

I’ve been swamped with other responsibilities, but am finally working on posting files to the online Mathcad Resource Center. Unfortunately, this file crashed my Mathcad 11 when I tried to open it twice, so I was unable to even view it in Mathcad 11. I am able to view it in Mathcad 14, and 90% of it works in Mathcad 14.

Some of the input files are missing.

I suggest you break it up into smaller files for posting in the Mathcad Resource Center, covering smaller topics. Some of the topics need more explanation as well, so it is clearer for other users, what you are doing.

I’ll be glad to post the shorter topics with some description when you resubmit them.

Thanks so much,
 
Mona
________________________________________

It would be wise working wisely. Plug your backup 2000 work sheets in 15. Read each one,
one by one top to bottom if they all go. If that step is successful, try a typical Mathcad work sheet that has cspline and from all the guidance you may have in this forum, read back in Smath ... it won't work. Smath cspline is a local interpolation, Mathcad is a scalar algorithm . Smath is not going to implement the missing code. From that same Mathcad work sheet, take the derivative of the cspline : it works, but not in Smath. Smath drivative is stricly "symbolic", it is not a numerical scalar derivative algorithm. Smath is not going to invent the missing code.

Next, Mathcad 15 is symbolic MuPad, Smath is Maple.

If you think Smath can reverse Engineer Mathcad/Mathsoft 2000 via transit PTC Mathcad 15: answer is surely NO. Make another test: you surely have a Mathcad 2000 work sheet using
"Minerr", Smath won't take. What made Mathcad/Mathsoft so powerful was their coding, protected by their own Patents and Patents of their subcontracts.

You may be condamned doing like I do, recode Mathcad 2000 manually as far as Smath can digest. Me is recoding Mathcad 11.2a ... 11.2a reads all Mathcad 2000 [very few little things in different presentation].


Offline Jean Giraud  
#6 Posted : 04 May 2016 07:01:55(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
... there is always a story behing a story. Mathsoft starts decade 1980, not just by a rainy day.
In those days, Engineers had little tools but one "TK Solver" a spread sheet style with lot of solving capabilities. Wise Microsoft "acquired" TK Solver in some ways and made it Excel. Wise TK Solver team went one step further, formed Mathsoft ... Allan Razdow becoming the "Inventor" of Mathcad [as he calls himself].
PTC was not even pregnant of itself [herself], 2½ millions were running Mathcad/Mathsoft.
Offline Jean Giraud  
#7 Posted : 04 May 2016 07:34:00(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
... here is a simple test: visit "Samples" Model Depopulation.
It contains a minimal example of "Minerr", that you can make
work in your Mathcad 15. Read back in Smath and let us know
if it works by changing a bit of the initial a,b,c,d
Offline reselty  
#8 Posted : 09 May 2016 15:38:41(UTC)
reselty


Rank: Member

Groups: Registered
Joined: 03/05/2016(UTC)
Posts: 20
Switzerland

Thank you two very much for the given answers and sorry for the late reaction

Dear Mr Carpi:
For a concrete solution and the taken time for looking for, and presentation . You used the better keywords than I could.


Dear Mr Giraud:
For so much interesting background information and experience, to not have to go also through…
Looks like you understand my not really written frustration about what happened to MathCad.
Another thing I didn’t describe exactly:
My wish to conserve the existing files as pdfs as they was written and a solution to make it easier to find a way to go with SMath with the smallest possible effort to convert completely when necessary.

+++++++++++++++

How it looks to me at the moment means:
Making pdf’s with the or the origin program (MathCad 2000).
Convert all of them to Smath in one batch processing, with the knowing of conversation mistakes (as I assumed from the beginning, cause of my first evaluations) – But what will even be a big help to build new Worksheets when necessary, based on converted mcd’s and pdf’s with solutions. The calculations are not to complicate at all, that I think for all of them, there will be ways to find solutions in SMath.


At the end : Do you think there is also a way for batch processing script to “safe as” xmcd and what Version of MathCad (11.2, 15, …) will be the better for best results.
Offline reselty  
#9 Posted : 09 May 2016 15:57:44(UTC)
reselty


Rank: Member

Groups: Registered
Joined: 03/05/2016(UTC)
Posts: 20
Switzerland

It looks like I could use following:
Mathcads automation interface
for the "save as" process.
"Right now Mathcad's automation interface is rather limited...supporting only SetComplex, GetComplex, Recalculate, and SaveAs methods"
Offline reselty  
#10 Posted : 13 May 2016 18:47:29(UTC)
reselty


Rank: Member

Groups: Registered
Joined: 03/05/2016(UTC)
Posts: 20
Switzerland

Print as pdf is possible, but what I forgot; lot of pages are wider than printformat and badly to read as pdf.
Found out that "save as" html would be better.

So I'm back on "HowTo" "save as" out from MathCAD (as for mcd to xmcd)...
Offline reselty  
#11 Posted : 13 May 2016 18:59:50(UTC)
reselty


Rank: Member

Groups: Registered
Joined: 03/05/2016(UTC)
Posts: 20
Switzerland

What also would be nice:
to let the files in the filestructure (find mcd's in structure and act on them)
and
place the html and xmcd in the same folder (save in samer folder than original)
Offline Davide Carpi  
#12 Posted : 14 May 2016 01:13:35(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,647
Man
Italy
Location: Italy

Was thanked: 1329 time(s) in 875 post(s)
You might try to run cmd.exe in the mathcad directory and type something like

Code:
mathcad.exe /help

Code:
mathcad.exe /?

Code:
mathcad.exe -help


If successful this should list all the available flags, maybe there is a -save or similar...

To loop through folders, it is something general about command line, you may found several hints just googling "batch loop through directories"
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
Offline Jean Giraud  
#13 Posted : 14 May 2016 06:13:03(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Originally Posted by: reselty Go to Quoted Post
What also would be nice:
to let the files in the filestructure (find mcd's in structure and act on them)
and
place the html and xmcd in the same folder (save in samer folder than original)


=============================================

Don't take my comment badly, I'm just 1/1 think/write.

1. Mathcad*.PDF and anything your keyboard puts on the screen [Smath as well....]
are just print on paper, dead like a stone. *.PDF are printing paper left in the
hard drive from the command "Print to file" then select the PDF creator, give file
name then open from a PDF reader.

2. Mathcad, Smath, Mathematica are direct equation editors. Maple is a "code to
equation edit/viewer". But only Smath, Mathcad have visual program construction editor.

3. There is no point having Mathcad /Smath compatibilty for (π/4)*D^2

4. Smath is not a "reverse Engineer" version of Mathcad .

5. That some very little Mathcad stuff can be put in some form of script [VB ...]
and that Smath would read back: maybe, but what for ? if you have created nothing
by yourself in Mathcad.

6. I don't understand your "batch convert" if there is nothing to convert.

7. In my Mathcad time [Mathcad 11] one of the gurus wrote a "Microsoft Component"
script to collect the entire Mathcad work sheets folder, then display back in a
Mathcad style extensible data table and open any particular work sheet. Very handy
for personnal use .

8. I don't understand your "batch save Mathcad 15" . You can create your own web site
"Google Sites" for $0.00, and upload as many Mathcad 15 files up to 100 MB per web page and upload all of them [1000's] up to the base limit of 10 GB Google Drive.
My Mathcad 11 web site uploads 663 work sheets in about 1 hr. Opening them as qucik as you can click takes about one full day.

In short, the magic button that will put Mathcad 15 stuff in Smath sheet is to me:
a Urban Myth. Don't you feel challenging to create in Smath ?

Cheers, Jean
Offline reselty  
#14 Posted : 14 May 2016 12:26:43(UTC)
reselty


Rank: Member

Groups: Registered
Joined: 03/05/2016(UTC)
Posts: 20
Switzerland

Thank you Mr. Carpi
I will check it on thuesday, when I'm next time in front of MathCAD!
Offline reselty  
#15 Posted : 14 May 2016 13:08:28(UTC)
reselty


Rank: Member

Groups: Registered
Joined: 03/05/2016(UTC)
Posts: 20
Switzerland

Dear Mr. Giraud

1. That’s all I want - I dead copy of that what I wrote in the time I was working on them - I think you would also be able to have a possibility to see your pictures made in 2000 in 20 years - or not...

And I rather would have a pdf as one page than in several pages, especially when they are wider than a page. And rather than in html, when html is not in one file.
But for now html gives me one "sheet" view as in the original...


2. Thank you for information

3,4,5+6. Even when the calculation in SMath fails, a lot of defining of variables and writing of formulas is done.
And für comparing results, after making SM to work, I can compare with copies of original in pdf/html, even when there is now more MathCAD access...
For what I saw in my tests it was only the definition of how to take numbers out excel files and showing the graphs..

7. Not sure if I understood right what means " display back in a
Mathcad style extensible data table"
But please only feedback on this when it does help on my ordinary question

8. Do not understand it.
Wishes:
1: changing from MathCAD to SMath
1: possibility to save an image of what I did once in a always readable form
3: taking out the most of offered conversion possibilities SM offers as possible,
(could also do this job in future, when needed, with the hope that than SM does this job even better) But then perhaps SM serves mcdx and not anymore xmcd. Easier to have than already a bunch of batched files already.

I like a lot the feeling to write formulas in SMath - it is intuitive and simple like I like.
To the challenging points I didn’t get yet, but it looked to me as it will fulfill my needs. Even that today I have to calculate less and simulate more, so that a lot of what I calculated the traditional way can be simulated today. Not worth anymore to pay what PTC would like to have paid. The Prime way I do not start to go!
Best regards
Offline Jean Giraud  
#16 Posted : 14 May 2016 16:36:55(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Hello Collab,

Mathcad 15 & Smath: they don't danse on the same pace. Even Mathcad 15 does not read or reads partially Mathcad 11 and the best stuff in Mathcad was from 11. Shortly after after PTC acquired Mathsoft, PTC destroyed Mathsoft by reinventing instead of few more of the wish list.
Mathcad 12 => a "Web version" piece of crap to force purchasing Mathcad 13 not supported after inventing Mathcad 14 that does not read Mathcad 11. Then Mathcad 15 no more Maple symbolic with MuPad symbolic.
Then Mathcad Primes , essentially Maxima and no more Maple. Up to Mathcad 11, former users of Mathcad 8 could read upward because one of our collab gurus made a little piece of code called "distiller".

You are not correct about PDF: it prints as the printer. If the stuff is within the page margins everything is fine in one page. Use "Print Preview" to arrange the content of a page.

More or less, if you want to have a piece of Mathcad in your Smath work sheet, do it simple:
"Print screnn" button on the keyboard, paste in Paint, select the portion of interest, paste in IrfanView,
redude to 256 colors => simple/fast no need for PDF, HTML ... after that: construct in Samath.
This is the difficult task because you have to interpret the Mathcad code .

In Mathcad [at least up to 11] a data table can be numbers or text . You can display as many rows/cols as you wish by the handles. So, a 16 millions rows by 16 millions cols, you can size to display 10 rows x 10 cols, per say and scroll over the rows/cols. So, if all my 1800 Mathcad sheets are collected in table, there are two cols [index and description], easy to search by scrolling up/down.

Since Mathcad 8, it came with the "Picture operator" that creates/reads RGB, You can save in file and read back in Smath in grayscale only. If you want to read back in color in Smath: save your Mathcad image as *.BMP [for instance] and open in Smath as an image from file.

As far as I can figure, Smath could read some simple formulas from Mathcad. They don't have same parenthesis priority. Smath could probably read a short Mathcad data table.

In Mathcad 11 and earlier, there is a lot of implicit coding hard to detect to make Smath equivalent.
On that, Smath is lot more educative because any coding must be complete to be visible for recoding
in other code structure. PTC is American that means $ sucker. My former Mathsoft collab(s) talked a lot about Smath as a substitute to Mathcad , right in the PTC Mathcad Community forum !

heers, Jean
Offline frapuano  
#17 Posted : 14 May 2016 16:50:54(UTC)
frapuano


Rank: Advanced Member

Groups: Registered
Joined: 01/08/2010(UTC)
Posts: 115
Man
Italy
Location: Rome

Was thanked: 13 time(s) in 13 post(s)
Jean

I apologize in advance for my question , probably is off-topic but where are now located all the files that were available in the MathCad Collab Site organized in different sections . Some of them were very interesting ...has been trow away everything or they still exist somewhere...even if there is always the problem on how to visualize them .

Best regards

Franco
Offline kilele  
#18 Posted : 14 May 2016 19:39:35(UTC)
kilele


Rank: Advanced Member

Groups: Registered
Joined: 30/03/2011(UTC)
Posts: 393

Was thanked: 132 time(s) in 113 post(s)
Can't your mathcad2000 be converted to maxima? Then the maxima plugin might be able to take over smath in order to understand these conversions.
As for having content of one .mcd into one single pdf or html, I would suggest converting them to html, then use one of those addons for firefox like nimbus which converts a webpage into a big png file or a smaller png with any region selected by the user.
Regarding a script to perform a number of batch processes upon your mathcad sheets placed into the same folder, it is possible to list said files, open them one by one and send keystroyes to the involved programs. There is a quite dirty solution when there's no commandline options, as long as there are keystrokes available provided by the program, for example 'ctrl+s' for saving a file. Tell us in pseudocode the keystrokes that you'd like to use and I'll to provide a small program written in fbsl.

Edited by user 15 May 2016 01:50:58(UTC)  | Reason: Not specified

Offline reselty  
#19 Posted : 14 May 2016 23:20:44(UTC)
reselty


Rank: Member

Groups: Registered
Joined: 03/05/2016(UTC)
Posts: 20
Switzerland

Thanks a lot for the interesting inputs .
I thought I could try something as well.

especially the inputs from kilele I would have checked.
I also followed a similar path, via AutoIt...

Befor Thuesday I can't act on it - hmmm...
Offline reselty  
#20 Posted : 15 May 2016 18:40:49(UTC)
reselty


Rank: Member

Groups: Registered
Joined: 03/05/2016(UTC)
Posts: 20
Switzerland

Hi kilele

I had to find time... and the wetter didn’t allow what we wanted to do, so my reaction:
First of all, I also thought about the png option, I do it with a chrome extension normally.
But this could be nice to have solution… (Included in the batch) – Not necessary...

I plaid with AutoHotKey’s Macrocreator to find out the Keys names… nearly had a solution….
I first searched in Windows Explorer for mcd’s an wanted to go through the hole list from up to down. - Starting with the highest marked:


Windows Explorer (highest marked)...How to adress it?
LAlt Down
f ..........................File
LAlt Up
Down
Down
Down
Down
Down
Down
Down
Down
Down
Right
Enter ...........................Copy path (ev. via short cut doable??)
Change to MathCAD .................How to adress it?
LAlt Down
f ...........................File
o ...........................open
LAlt Up
LControl Down
v ...........................Paste path
LControl Up
Enter
LControl Down
r ............................refresh calculation
LControl Up
LAlt Down
f ............................File
a ............................save as
LAlt Up
Enter
LAlt Down
f
w .............................save as html
LAlt Up
Enter
Enter .............................2 x !!
LControl Down
w .............................close
LControl Up
Change to WindExpl .............How to adress it?
Down
LOOP

Thanks a lot for your interest and time taking !!!
Best regards
reselty
Users browsing this topic
Guest
3 Pages123>
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.