MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

### Discover what MATLAB® can do for your career.

 Subject: simmechanics link install help PRO/E From: Alex Date: 19 Nov, 2009 17:19:21 Message: 1 of 4 Hi, I am trying to install simmechanics link 3.1.1 with matlab r2009b and connect to pro/e wildfire 4. First step, download r2009b zip file containing relevent folders for simmechanics link. also downloaded install_addon.m run the install from matlab command line. Apparently all was installed succesfully. Now I am supposed to edit the config.pro file of pro/e, and adjust it to point at a registry file I have created. This is where I am confused. From the matlab instructions on linking with pro e, and a search through the forums, I am supposed to make a registry file with the following lines of code in it. name SimMechanics Link startup dll exec_file $F:\Program Files\MATLAB\R2009b/bin/win32/cl_proe2sm.dll text_dir$F:\Program Files\MATLAB\R2009b/toolbox/physmod/smlink/cad_systems/proe/ unicode_encoding false end F is where my pro e and matlab are intalled. I named it proe2sm.dat and it now appears in my pro e bin folder as a dat file. I chose to put it in the bin folder because apparently it should be in the pro e startup folder. I start the automated server in matlab by typing at the command line: h = actxserver('matlab.application') It responds: h =   COM.matlab_application and a matlab command window appears If i type enableservice('AutomationServer') at the matlab command line, it returns 0. If I type it in the matlab command window that appeared it returns 1. So i think the automated server is running. But when I open pro e I get warnings about duplicate pro/toolkits and then smlink cannot be found/doesnt exist. where did i go wrong? thanks
 Subject: simmechanics link install help PRO/E From: Arnaud Miege Date: 19 Nov, 2009 21:44:25 Message: 2 of 4 "Alex " wrote in message news:he3ump$97m$1@fred.mathworks.com... > Hi, I am trying to install simmechanics link 3.1.1 with matlab r2009b and > connect to pro/e wildfire 4. > > First step, download r2009b zip file containing relevent folders for > simmechanics link. also downloaded install_addon.m > > run the install from matlab command line. Apparently all was installed > succesfully. > > Now I am supposed to edit the config.pro file of pro/e, and adjust it to > point at a registry file I have created. > > This is where I am confused. From the matlab instructions on linking with > pro e, and a search through the forums, I am supposed to make a registry > file with the following lines of code in it. > > name SimMechanics Link > startup dll > exec_file $F:\Program Files\MATLAB\R2009b/bin/win32/cl_proe2sm.dll > text_dir$F:\Program > Files\MATLAB\R2009b/toolbox/physmod/smlink/cad_systems/proe/ > unicode_encoding false > end > > F is where my pro e and matlab are intalled. > > I named it proe2sm.dat and it now appears in my pro e bin folder as a dat > file. > > I chose to put it in the bin folder because apparently it should be in the > pro e startup folder. > > I start the automated server in matlab by typing at the command line: > h = actxserver('matlab.application') > > It responds: > > h = > > COM.matlab_application > and a matlab command window appears > > If i type enableservice('AutomationServer') at the matlab command line, it > returns 0. If I type it in the matlab command window that appeared it > returns 1. So i think the automated server is running. > > But when I open pro e I get warnings about duplicate pro/toolkits and then > smlink cannot be found/doesnt exist. > > where did i go wrong? > > thanks > Here's what I did with mine and it works (I assume that you have downloaded and installed the correct version of SimMechanics Link, i.e. if Pro/E is 32-bit, then MATLAB and SimMechanics Link need to be 32-bit too; v3.1.1 is the correct version for R2009b): * I created a directory called C:\Work\proeStartUp_WF4 * In that directory, I have a config.pro and a protk.dat file. * The protk.dat file is as follows (I don't think you need a $in front of the drive letter): NAME SimMechanics Link STARTUP dll EXEC_FILE C:\Program Files\MATLAB\R2009b\bin\win32\cl_proe2sm.dll TEXT_DIR C:\Program Files\MATLAB\R2009b\toolbox\physmod\smlink\cad_systems\proe\text UNICODE_ENCODING false END and the config.pro as follows: toolkit_registry_file C:\Work\proeStartUp_WF4\protk.dat * In MATLAB, I have a startup.m file on my MATLAB path with (amongst other things), the following line (note you need to have administrator rights for this to work): enableservice('automationserver',true); * I have edited the shortcut to Pro/E WF4 on my desktop to start in C:\Work\proeStartUp_WF4. When I double-click on the shortcut, Pro/E starts up and SimMechanics Link appears as a menu item. HTH, Arnaud  Subject: simmechanics link install help PRO/E From: Alex Date: 23 Nov, 2009 14:56:19 Message: 3 of 4 > Here's what I did with mine and it works (I assume that you have downloaded > and installed the correct version of SimMechanics Link, i.e. if Pro/E is > 32-bit, then MATLAB and SimMechanics Link need to be 32-bit too; v3.1.1 is > the correct version for R2009b): > > * I created a directory called C:\Work\proeStartUp_WF4 > * In that directory, I have a config.pro and a protk.dat file. > * The protk.dat file is as follows (I don't think you need a$ in front of > the drive letter): > > NAME SimMechanics Link > STARTUP dll > EXEC_FILE C:\Program Files\MATLAB\R2009b\bin\win32\cl_proe2sm.dll > TEXT_DIR C:\Program > Files\MATLAB\R2009b\toolbox\physmod\smlink\cad_systems\proe\text > UNICODE_ENCODING false > END > > and the config.pro as follows: > > toolkit_registry_file C:\Work\proeStartUp_WF4\protk.dat > > * In MATLAB, I have a startup.m file on my MATLAB path with (amongst other > things), the following line (note you need to have administrator rights for > this to work): > enableservice('automationserver',true); > > > * I have edited the shortcut to Pro/E WF4 on my desktop to start in > C:\Work\proeStartUp_WF4. When I double-click on the shortcut, Pro/E starts > up and SimMechanics Link appears as a menu item. > > HTH, > > Arnaud > Thanks Arnaud, now Pro e openst the splash screen but doesnt make it any further than that. This is what I have. At the location F:\ProEngineer\matlab\proeStartUp_WF4 I have in that folder config.pro only includes the line: toolkit_registry_file F:\ProEngineer\matlab\proeStartUp_WF4\protk.dat I tried to copy the original config.pro and just add the line to the bottom of it, but it caused errors. there are still errors though with just the above line in config.pro I have the protk.dat file which has inside of it NAME SimMechanics Link STARTUP dll EXEC_FILE F:\Program Files\MATLAB\R2009b\bin\win32\cl_proe2sm.dll TEXT_DIR F:\Program Files\MATLAB\R2009b\toolbox\physmod\smlink\cad_systems\proe\text UNICODE_ENCODING false END I was slightly confused about the startup.m file. At the moment all it has in it is the line enableservice('automationserver',true); and is saved in E:\Documents and Settings\Alex\MATLAB which is the folder that matlab initially looks at when you open it. I opened the properties to PRO E shortcut, and in the start in line, I added F:\ProEngineer\matlab\proeStartUp_WF4 at the location F:\ProEngineer\matlab\proeStartUp_WF4 when i run pro e and it fails it creates a file called std.OUT which holds numerous errors, below are the first three ERROR - F:\ProEngineer\text\config.pro, linenum 3 : Keyword 'ACTIVATE_SKETCH_WITH_DFLT' is not valid. ERROR - F:\ProEngineer\text\config.pro, linenum 6 : Keyword 'ADOBE_DISTILLER' is not valid. ERROR - F:\ProEngineer\text\config.pro, linenum 15: Keyword 'ALLOW_MULTIPLE_TOOL_TIPS' is not valid. the config.pro file i created ONLY has the line toolkit_registry_file F:\ProEngineer\matlab\proeStartUp_WF4\protk.dat The only positive, is when I run matlab and check to see whether the server is working it returns 1. thanks again Alex
 Subject: simmechanics link install help PRO/E From: Arnaud Miege Date: 23 Nov, 2009 16:56:44 Message: 4 of 4 "Alex " wrote in message news:hee7qj$kf7$1@fred.mathworks.com... > > Thanks Arnaud, now Pro e openst the splash screen but doesnt make it any > further than that. > > This is what I have. > > At the location > F:\ProEngineer\matlab\proeStartUp_WF4 > I have in that folder config.pro only includes the line: > > toolkit_registry_file F:\ProEngineer\matlab\proeStartUp_WF4\protk.dat > > I tried to copy the original config.pro and just add the line to the > bottom of it, but it caused errors. there are still errors though with > just the above line in config.pro > > > I have the protk.dat file which has inside of it > > NAME SimMechanics Link > STARTUP dll > EXEC_FILE F:\Program Files\MATLAB\R2009b\bin\win32\cl_proe2sm.dll > TEXT_DIR F:\Program > Files\MATLAB\R2009b\toolbox\physmod\smlink\cad_systems\proe\text > UNICODE_ENCODING false > END > > I was slightly confused about the startup.m file. At the moment all it has > in it is the line > enableservice('automationserver',true); > and is saved in > E:\Documents and Settings\Alex\MATLAB > > which is the folder that matlab initially looks at when you open it. > > I opened the properties to PRO E shortcut, and in the start in line, I > added > F:\ProEngineer\matlab\proeStartUp_WF4 > > at the location > F:\ProEngineer\matlab\proeStartUp_WF4 when i run pro e and it fails it > creates a file called std.OUT which holds numerous errors, below are the > first three > > ERROR - F:\ProEngineer\text\config.pro, linenum 3 : Keyword > 'ACTIVATE_SKETCH_WITH_DFLT' is not valid. > ERROR - F:\ProEngineer\text\config.pro, linenum 6 : Keyword > 'ADOBE_DISTILLER' is not valid. > ERROR - F:\ProEngineer\text\config.pro, linenum 15: Keyword > 'ALLOW_MULTIPLE_TOOL_TIPS' is not valid. > > the config.pro file i created ONLY has the line > toolkit_registry_file F:\ProEngineer\matlab\proeStartUp_WF4\protk.dat > > The only positive, is when I run matlab and check to see whether the > server is working it returns 1. > > thanks again > > Alex > It looks like Pro/E is looking at a different config.pro to the one you created in F:\ProEngineer\matlab\proeStartUp_WF4. Maybe rename the config.pro in F:\ProEngineer\text\ to something like config.old and see if that fixes it. You can then try adding the lines from F:\ProEngineer\text\config.old to F:\ProEngineer\matlab\proeStartUp_WF4\config.pro one a time to see if it still works. That should help you narrow down what's wrong. This seems to be more a Pro/E issue rather than a MATLAB one so you may have more luck on a Pro/E forum. HTH, Arnaud