Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Solidworks to simmechanics: export option missing from menu

481 views
Skip to first unread message

tegan pringle

unread,
Oct 26, 2009, 3:04:03 PM10/26/09
to
Hello,

I have recently installed simmechanics link into my copy of matlab and then connected the simmechanics link to my solidworks software so that i can export models to simmechanics.

This took me a while but eventually they all linked up and i can add simmechanics into solidworks as an 'add-in' now.

The problem im having is that when i go to the simmechanics menu within solidworks (on the top tool menu) - the 'export to xml' option is missing - im totally confused because the all the other menu options are there - like export settings etc

Does anybody know how i can get the export option to show up on the menu?

Many thanks

T x

tegan pringle

unread,
Oct 26, 2009, 3:32:02 PM10/26/09
to
"tegan pringle" <teg...@hotmail.com> wrote in message <hc4rr3$a6h$1...@fred.mathworks.com>...


*****UPDATE: PROBLEM FIXED****************************************

I have fixed the problem - i forgot to register matlab as an automation server, i now have the option to save models as *XML files - but i guess it doesnt put an 'export' option on the simmechanics menu within solidworks.

Hopefully that bit of info will help somebody else with the same problem

************************************************************

Arnaud Miege

unread,
Oct 27, 2009, 6:48:15 AM10/27/09
to

"tegan pringle" <teg...@hotmail.com> wrote in message
news:hc4tfi$qea$1...@fred.mathworks.com...

Yes, you need to register MATLAB as an automation server. In Pro/E, there is
an export to SimMechanics option in the SimMechanics menu item, but I think
in SolidWorks it's different, you just do File -> Save As... -> SimMechanics
(.XML).

Arnaud


tegan pringle

unread,
Nov 1, 2009, 4:14:01 PM11/1/09
to

> >
>
> Yes, you need to register MATLAB as an automation server. In Pro/E, there is
> an export to SimMechanics option in the SimMechanics menu item, but I think
> in SolidWorks it's different, you just do File -> Save As... -> SimMechanics
> (.XML).
>
> Arnaud
>


********************************************************

Many thanks Arnaud i have now managed to sucessfully export the xml file, but im still having trouble importing the xml file into simmechanics i keep getting the following error message when i use the import_physmod command to try and import the xml file:

Warning: Undefined function or variable 'mech_import'.
> In C:\Program Files\MATLAB\R2008a\toolbox\physmod\pmimport\pmimport\pmiu_dlg.p>OkBtn_Callback at 175
In gui_mainfcn at 96
In C:\Program Files\MATLAB\R2008a\toolbox\physmod\pmimport\pmimport\pmiu_dlg.p>pmiu_dlg at 44


I am using matlab 2008a - that is why i used the import_physmod command and not the mech_import command.

Would you be able to shed any light on this error message as i cant find any way to fix it.

Many thanks

Tegan

Leotrisport

unread,
Nov 18, 2009, 10:38:58 PM11/18/09
to
On 1 nov, 19:14, "tegan pringle" <tega...@hotmail.com> wrote:
> > Yes, you need to register MATLAB as an automation server. In Pro/E, there is
> > an export toSimMechanicsoption in theSimMechanicsmenu item, but I think

> > in SolidWorks it's different, you just do File -> Save As... ->SimMechanics
> > (.XML).
>
> > Arnaud
>
> ********************************************************
>
> Many thanks Arnaud i have now managed to sucessfully export the xml file, but im still having trouble importing the xml file intosimmechanicsi keep getting the following error message when i use the import_physmod command to try and import the xml file:
>
> Warning: Undefined function or variable 'mech_import'.> In C:\Program Files\MATLAB\R2008a\toolbox\physmod\pmimport\pmimport\pmiu_dlg.p>OkBtn_Call back at 175

>
>   In gui_mainfcn at 96
>   In C:\Program Files\MATLAB\R2008a\toolbox\physmod\pmimport\pmimport\pmiu_dlg.p>pmiu_dlg at 44
>
> I am using matlab 2008a - that is why i used the import_physmod command and not the mech_import command.
>
> Would you be able to shed any light on this error message as i cant find any way to fix it.
>
> Many  thanks
>
> Tegan

Hi Tegan I'm writing some tutorials using SimMechanics, in this
tutorial I'm modeling a servomotor please take a look and see if it
helps
http://www.tutoriaisengenharia.com/Electronics_Engineering/Actuators/Servomotor.php

Paul

unread,
Aug 22, 2010, 9:03:06 AM8/22/10
to
Leotrisport <leonardoar...@gmail.com> wrote in message <b4e9ab31-ef61-4f99...@e31g2000vbm.googlegroups.com>...

Hello,

I am also getting this same error message and SimMechanics is not allowing me to import my .xml file.

Input: import_physmod

Output: In C:\Users\Selvadurai PA\Desktop\MATLAB 32-bit\toolbox\physmod \pmimport\pmimport\pmiu_dlg.p>OkBtn_Callback at 175
In gui_mainfcn at 96
In C:\Users\Selvadurai PA\Desktop\MATLAB 32-bit\toolbox\physmod\pmimport\pmimport\pmiu_dlg.p>pmiu_dlg at 44

Using CAD Translator 3.0 (32 bit)---> Matlab 2008b (32 bit)-----> Pro-E wildfire 2.0 (32-bit).

I am running Windows 7 on my computer... could this be the issue?

Also, the video is helpful but MATLAB 2008b does not recognize the 'mech_import' command ----> ??? Undefined function or variable 'import_mech'.

Thanks,

Paul

Arnaud Miege

unread,
Aug 23, 2010, 4:32:36 AM8/23/10
to

"Paul " <pa.sel...@gmail.com> wrote in message
news:i4r76a$jo2$1...@fred.mathworks.com...

>
> Hello,
>
> I am also getting this same error message and SimMechanics is not allowing
> me to import my .xml file.
>
> Input: import_physmod
>
> Output: In C:\Users\Selvadurai PA\Desktop\MATLAB 32-bit\toolbox\physmod
> \pmimport\pmimport\pmiu_dlg.p>OkBtn_Callback at 175
> In gui_mainfcn at 96
> In C:\Users\Selvadurai PA\Desktop\MATLAB
> 32-bit\toolbox\physmod\pmimport\pmimport\pmiu_dlg.p>pmiu_dlg at 44
>
> Using CAD Translator 3.0 (32 bit)---> Matlab 2008b (32 bit)-----> Pro-E
> wildfire 2.0 (32-bit).
>
> I am running Windows 7 on my computer... could this be the issue?
>
> Also, the video is helpful but MATLAB 2008b does not recognize the
> 'mech_import' command ----> ??? Undefined function or variable
> 'import_mech'.
>
> Thanks,
>
> Paul

mech_import replaces import_physmod as of R2008b:
http://www.mathworks.com/access/helpdesk/help/toolbox/physmod/mech/rn/brqy93n.html

If it is not being recognized, then there's something wrong with your
installation. What output do you get if you type ver at the MATLAB command
line?

Arnaud


Arnaud Miege

unread,
Aug 23, 2010, 5:15:17 AM8/23/10
to

"Paul " <pa.sel...@gmail.com> wrote in message
news:i4r76a$jo2$1...@fred.mathworks.com...
>
> Hello,
>
> I am also getting this same error message and SimMechanics is not allowing
> me to import my .xml file.
>
> Input: import_physmod
>
> Output: In C:\Users\Selvadurai PA\Desktop\MATLAB 32-bit\toolbox\physmod
> \pmimport\pmimport\pmiu_dlg.p>OkBtn_Callback at 175
> In gui_mainfcn at 96
> In C:\Users\Selvadurai PA\Desktop\MATLAB
> 32-bit\toolbox\physmod\pmimport\pmimport\pmiu_dlg.p>pmiu_dlg at 44
>
> Using CAD Translator 3.0 (32 bit)---> Matlab 2008b (32 bit)-----> Pro-E
> wildfire 2.0 (32-bit).
>
> I am running Windows 7 on my computer... could this be the issue?
>
> Also, the video is helpful but MATLAB 2008b does not recognize the
> 'mech_import' command ----> ??? Undefined function or variable
> 'import_mech'.
>
> Thanks,
>
> Paul

Also, I don't think Windows 7 is supported for R2008b:
http://www.mathworks.co.uk/support/sysreq/release2008b/index.html

You might also want to have a look at the following technical notes about
running MATLAB 32-bit on a 64-bit O/S:
http://www.mathworks.com/support/solutions/en/data/1-1CAT7/index.html
http://www.mathworks.com/support/solutions/en/data/1-579TVF/index.html

In summary, if you are going to use Windows 7, you should really be using
R2010a.

Arnaud


0 new messages