Items tagged with library


I have tried to do it by the following command "File/Modelica/Import Modelica Library" in MapleSim GUI. An error appears saying "Modelica is a reserved name".

I think you can also reproduce it by downloading the Modelica library from the following web site: "". And then importing it in the usual way by openning the file at the root directory.

I think I am missing something here, so any advise/information/minimal commentary would be greatly appreciated.

Cheers, Ovle


how can I use procedures saved in ".m" files in my own repository?

I've created

[["Auxiliary.m", [2016, 10, 10, 15, 53, 20], 1024, 3333]]

and registered it in the maple.ini
     "C:\Program Files\Maple 18\Maple 18\lib",
       "C:\Users\Stefan\maple\toolbox\Iterator\lib", ".",

but Maple don't know the procedure squarefree() from the repository. What is wrong?


I modelled a telecamera and line follower sensors in Maple in order to calculate the "error" for my PID controller. Know i would like to share this information with the PID in MapleSim but I have no idea how to do it. Is there a way to import maple libraries into MapleSim?



I have a problem using variables values that were read form Maple library file (*.mla) with units.

For example:

In the first file called "" I calculate a variable with units and save value to "lib1.mla" file


A__1 := Units:-Standard:-`*`(2, Unit('m'))



A1 := Units:-Standard:-Unit('m')



savelib('A__1', 'A1', cat(interface(worksheetdir), "\\lib1.mla"))







In the second file called "" I can read the value of a variable, but can't use it in expressions:


libname := cat(interface(worksheetdir))










Error, (in Units:-Standard:-*) invalid subscript selector









Error, (in Units:-Standard:-*) invalid subscript selector






Where I made a mistake? 

I have Maple package "DESOLVE" having two different types of files namely in format .mpl and .mws, where code is written in .mpl file and .mws is just a example worksheet, this package is available at following link;

My problem is how to work with package?

One thing that I able to do is that I have opened the file type .mpl  in Maple worksheet and after executing whole whorsheet I able to to start working with package using with(desolv).

But when I type with(desolv) in new worksheet an error shows up.

How I can store this .mpl file in Maple library so as to use this package using "with(desolv)" in new worksheets


I use Maple18 on unix 64. I have the MAPLE and the LD_LIBRARY_PATH properly set up to use OpenMaple. When I link my code to OpenMaple library I get segmentation fault when I try to debug using gdb. In order to isolate the problem, I created a simple file that contains the following:


#include <string>

#include <stdio.h>


int main()


int x = 10;

std::string abc;

abc = "testString";

printf("this is it %s\n", abc.c_str());



When I compile the code using g++ -g -o temp I can run ./temp and step into the code using gdb with no problems.


If I link to Maple Library g++ -g -o temp -L/opt/maple18/bin.X86_64_LINUX –lmaplec


I can run the code ./temp but I can not step into it using gdb. I get the error as shown below when I try to step over std::string abc.




GNU gdb (GDB) 7.8

Copyright (C) 2014 Free Software Foundation, Inc.

License GPLv3+: GNU GPL version 3 or later <>

This is free software: you are free to change and redistribute it.

There is NO WARRANTY, to the extent permitted by law.  Type "show copying"

and "show warranty" for details.

This GDB was configured as "x86_64-unknown-linux-gnu".

Type "show configuration" for configuration details.

For bug reporting instructions, please see:


Find the GDB manual and other documentation resources online at:


For help, type "help".

Type "apropos word" to search for commands related to "word"...

Reading symbols from temp...done.

(gdb) b main

Breakpoint 1 at 0x40091f: file, line 6.

(gdb) r

Starting program: xxxxxxxxxxxxxxxxxxxxxxxxxxx

[Thread debugging using libthread_db enabled]

Using host libthread_db library "/lib/".


Breakpoint 1, main () at

6         int x = 10;

(gdb) n

7       std::string abc;

(gdb) n

BFD: reopening /tmp/xf-dll/xf-1274259bc6684076beea8652f625b03bf2133.tmp: No such file or directory


BFD: reopening /tmp/xf-dll/xf-1274259bc6684076beea8652f625b03bf2133.tmp: No such file or directory


BFD: reopening /tmp/xf-dll/xf-1274259bc6684076beea8652f625b03bf2133.tmp: No such file or directory


Can't read data for section '.eh_frame' in file '/tmp/xf-dll/xf-1274259bc6684076beea8652f625b03bf2133.tmp'

0x00000000004007a8 in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string()@plt


(gdb) n

Single stepping until exit from function _ZNSsC1Ev@plt,

which has no line number information.

Segmentation fault

Do you have physical components like MOSFETs and IGBTs in your library? How can I have a look at the tool and library block sets?

I have created and saved a MAPLE module in an .mla archive. The module contains three procedures A, B, C, where

A calls, B and C.  

Once the module library has been loaded, A acccepts inputs and generates outputs.

Is it possible to create a MAPLE player worksheet which calls the module and share it with a Maple Player (only) user, so that they can then supply the inputs and observe the outputs from A using the Maple Player programme components?

Can anyone help?






I have a Maple file which contains many proc loops and functions.

I need a linkage between some files to read the requested functions from source file and export calculations to another file.

Is it possible?

Hi all,

I google and found a program using C# connect with Maple. The Maple file is mla file - a pakage library type of Maple. I want to review data structure and all interfaces funtions to understand the way to implement this features.

Please help me the way to read the original Maple code. I uploaded the .mla file into mediafire if you want to review it. Link 


Quan Nguyen

Hello everyone,

I have nonlinear partial differential equations (see the attached file) need to be solved:

With initial condition: h(x, y) = K1 (constant), dh/dx = K2 (constant); dh/dy = K3 (constant); And h(x,y) is function of (x,y) other factors are constant. Could anyone tell me how to solve these equations by using numerical method? Do you know any library in c/ c++ language that can solve these equations??

I have tried with Maple 17 and the response is: "Error, (in pdsolve/info) first argument is not a differential equation". Whole of my input:


with(PDEtools); declare(U1(x, y), U2(x, y), U3(x, y));

PDEs = [diff(U1(x, y), y) = U2(x, y),

diff(U1(x, y), x) = U3(x, y),

(diff(U2(x, y), y))*((L-U1(x, y))^2+(D2+tan(alpha)*(L+U1(x, y)))^2)+.5*U2(x, y)*(2*tan(alpha)*U1(x, y)-D2) = 0,

(diff(U3(x, y), x))*((L-U1(x, y))^2+D1^2*cos(alpha+2*U2(x, y))^2)+.5*U3(x, y)*D1*cos(alpha+2*U2(x, y))+.5*D1*sin(alpha+2*U2(x, y))*(L-U1(x, y)) = 0];


[ d d / d
PDEs = [--- U1(x, y) = U2(x, y), --- U1(x, y) = U3(x, y), |--- U2(
[ dy dx \ dy

\ / 2 2\
x, y)| \(L - U1(x, y)) + (D2 + tan(alpha) (L + U1(x, y))) /

/ d
+ 0.5 U2(x, y) (2 tan(alpha) U1(x, y) - D2) = 0, |--- U3(x, y)
\ dx

\ / 2 2 2\
| \(L - U1(x, y)) + D1 cos(alpha + 2 U2(x, y)) /

+ 0.5 U3(x, y) D1 cos(alpha + 2 U2(x, y))

+ 0.5 D1 sin(alpha + 2 U2(x, y)) (L - U1(x, y)) = 0]

Error, (in pdsolve/info) first argument is not a differential equation


I will be very appreciated with your help!!!

How to show the code in file with extension .lib and edit it?


I have defined a function(say fun) to do certain task, it works well when I call it from a script file(say script1). However, when I copy the complete script1 and paste onto another script file(say script2), the function, fun, doesn't execute. It's very peculiar as my project requires lot of modification, so I copy the old script and...


I want to put some code into a Maple library. I'm new to producing packages. The following code runs OK, but when I try to use one of the procedures added by the LibraryTools[Save] command, Maple returns

input: MySum(a, b);
output: MyMapleLibrary:-MySum(a, b)

Why does Maple return an unevaluated call to MySum?

The code is below:


  description "A sample Maple library.":


In chapter 2 of the Advanced Programming Guide, it says:

"Important Always ensure that the standard Maple library is write-protected to avoid saving expressions in it. If you accidentally save something to the standard Maple library, you may need to restore the original from media on which you obtained the Maple software".

How do I make the standard Maple library write-protected? Is it by marking as read-only the following folder?

1 2 Page 1 of 2