Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Content layer
id1751620316
Content column
id1751620318
Content block
id1751620317
Warning
titleImportant
  • MATLAB 2014a on Mac OS is not capable of evaluating or returning values via the Simulation console, which causes the modeling tool to freeze. To solve this problem, you must upgrade MATLAB to 2014b or later.
  • For Mac users, Simulation Toolkit Version 18.5 SP2 and later can integrate with MATLAB 2016b seamlessly without disabling System Integrity Protection (SIP) unless it is necessary to disable SIP (as a new feature of the latest OS X El Capitan) for successful integration.



To disable OS X El Capitan's System Integrity Protection (for Mac OS X)


  1. Restart your Mac.
  2. As soon as the screen turns black, hold down the command + R keys to access the Recovery Partition.
  3. When the Apple logo appears on the screen, release the keys.
  4. Click the Utilities menu and select Terminal.
  5. Type csrutil disable in the Terminal dialog and press Return. A message will appear to indicate that SIP has been disabled.
  6. Restart your Mac again for the changes to take effect.
  7. Run MagicDraw/Cameo Systems Modeler and integrate it with MATLAB.

To use MATLAB® on Mac OS 10.6 (Snow Leopard)


  1. Install MATLAB®.
  2. Type the following commands in the terminal to show all files in Finder
     $ defaults write com.apple.finder AppleShowAllFiles TRUE 
     $ killall Finder
  3. Add the DYLD_LIBRARY_PATH variable to Mac OS:
    3.1 Create an empty text file in the /etc folder and name it: launchd.conf.
    3.2 Open it with a text editor, for example, TextEdit, and type the following text (no space)

    setenv DYLD_LIBRARY_PATH /Applications/MATLAB_R2010b.app/bin/maci64:
    /Applications/MATLAB_R2010b.app/runtime/maci64


    3.3 Save the text file as launchd.conf to the desktop.
    3.4 Move the launchd.conf file to the /etc folder. 

  4. Create a link to the MATLAB® executable file in /usr/bin if it does not yet exist.
  5. Call the following commands in the terminal
     $ cd /usr/bin 
     $ ln -s /Applications/MATLAB_R2010b.app/bin/matlab matlab
  6. Type the following commands in the terminal to reset Finder
     $ defaults write com.apple.finder AppleShowAllFiles FALSE 
     $ killall Finder
  7. Restart Mac OS. 
Note
titleNote

You can also use MATLAB if you are using MagicDraw 18.0 on either Mac OS X 10.10 Yosemite or Mac OS X 10.11 El Capitan by following these steps:

  1. Disable the SIP (if your Mac is OS X El Capitan) by following the instruction for disabling OS X El Capitan's System Integrity Protection (SIP).
  2. Install MATLAB ®.
  3. Create the file com.nomagic.magicdraw.simulation.mathengine.plist.
    3.1 Create a text file and type the following text.

    Code Block
    <!DOCTYPE plist PUBLIC"-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    <key>Label</key>
    <string>com.nomagic.magicdraw.simulation.mathengine.plist</string>
    <key>ProgramArguments</key>
    <array>
    <string>sh</string>
    <string>-c</string>
    <string>
    launchctl setenv DYLD_LIBRARY_PATH
    /Applications/MATLAB_R2012a.app/bin/maci64:/Applications/MATLAB_R2012a.app/runtime/maci64
    </string></array><key>RunAtLoad</key><true/></dict></plist>


    3.2 Change the  /Applications/MATLAB_R2012a.app to your MATLAB directory.
    3.3 Save the text file. (If you are using TextEdit, change the file to plain text by clicking Format > Make Plain Text).
    3.4 Rename it as com.nomagic.magicdraw.simulation.mathengine.plist.

     

    (Note: If you already have the file com.nomagic.magicdraw.simulation.mathengine.plist in /Library/LaunchAgents, add   :/Applications/MATLAB_R2012a.app/bin/maci64:/Applications/MATLAB_R2012a.app/runtime/maci64 to your DYLD_LIBRARY_PATH in your com.nomagic.magicdraw.simulation.mathengine.plist. F or example, launchctl setenv DYLD_LIBRARY_PATH <Other_Path>:/Applications/MATLAB_R2012a.app/bin/maci64:/Applications/MATLAB_R2012a.app/runtime/maci64 .)


  4. Create the file com.nomagic.magicdraw.simulation.mathengine.matlab.plist.
    4.1 Create a text file and type the following text.

    Code Block
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    <key>Label</key>
    <string>com.nomagic.magicdraw.simulation.mathengine.matlab.plist</string>
    <key>ProgramArguments</key>
    <array>
    <string>sh</string>
    <string>-c</string>
    <string>
    launchctl setenv MD_MATLAB_MATHENGINE
    /Applications/MATLAB_R2012a.app/bin/maci64:/Applications/MATLAB_R2012a.app/runtime/maci64
    </string></array><key>RunAtLoad</key><true/></dict></plist>


    4.2 Change "/Applications/MATLAB_R2012a.app" to your MATLAB directory.
    4.3 Save the text file. (If you are using TextEdit, change the file to plain text by clicking Format > Make Plain Text).
    4.4 Rename it as com.nomagic.magicdraw.simulation.mathengine.matlab.plist.

  5. Move the files to /Library/LaunchAgents/ by using the Terminal.
    5.1 Run the Terminal.
    5.2 Go to the plist files directory.
    • $ cd [your plist file directory]

al5.3 Move the plist file to /Library/LaunchAgents/ using the following command

    • $ sudo mv com.nomagic.magicdraw.simulation.mathengine.plist /Library/LaunchAgents/
    • $ sudo mv com.nomagic.magicdraw.simulation.mathengine.matlab.plist /Library/LaunchAgents/

6. Create a link to the MATLAB® executable file in /usr/bin if it does not exist, by using the following command in the Terminal

    • $ cd /usr/bin
    • $ sudo ln -s /Applications/MATLAB_R2012a.app/bin/matlab matlab
Note
titleNote

You need to change the /Applications/MATLAB_R2012a.app in the command line to your MATLAB directory.

7. Restart Mac OS.

Content block
id1751620314

Related pages