I’ve been using Dymola (version 2017) for three months and I’d just like to ask a simple issue that I think about it nearly every day. Is there any difference between the file tool “Open” and “Load"? I'm used to use Load for “load” the library packages and Open for “open” the model files, but I've tried to switch them few times and I didn’t notice any difference. I guess that it isn’t relevant and actually it’s just out of curiosity, but maybe someone in this community is able to shed some light on why there are two buttons. Thanks in advance.
Both load your .mo files into the package browser. But Open changes the working directory to the location of the .mo file, whereas Load does not.
From the command line:
openModel("lib.mo", changeDirectory=false) // corresponds to load
openModel("lib.mo") // corresponds to open
You can check your current working directory by typing cd on the command line.
Yesterday I updated unity from unity5 to 2018.2.2f1. Unity scripts are not loading after Update 2018.2.2f1.
Once I try to play the Scene the scripts are not loaded and I can't add the script again it gives this error:
Can't add script component 'CubeScript' because the script class
cannot be found. Make sure that there are no compile errors and that
the file name and class name match.
If you still have the old copy of the project, upgrade the Unity project to Unity 2017 first then to 2018.2.2f1.
Here are the few possible reasons you may get this error(Ordered from very likely)
1.Script name does not match class name.
If script name is called MyClass, the class name must be MyClass. This is also case-sensitive. Double check to make sure that this is not the issue. To make sure that's not the issue, copy the class name and paste it as the script name to make sure that this is not the issue.
Note that if you have have multiple classes in one script, the class name that should match with the script name is the class that derives from MonoBehaviour.
2.There is an error in your script. Since this is an upgrade, there is a chance you're using an API that is now deprecated and removed. Open your script with Visual Studio and see if there is an error there then fix it. There is usually a red line under a code that indicates there is an error.
3.Bad import with the Unity importer and its automatic upgrade script.
Things to try:
A.The first thing to do is restart the Unity Editor.
B.Right click on the Project Tab then click "Reimport All"
C.If there is still issue, the only left is deleting the problematic script and creating a new one. There is an easier way to do this if the script is attached to many GameObjects in your scene.
A.Open the script, copy its content into notepad.
B.From the Editor and on the Project tab right click on the script "CubeScript", select "Find References In Scene".
C.Unity will now only show all the GameObjects that has this script attached to them. Delete the old script. Create a new one then copy the content from the notepad to this new script. Now, you can just drag the new script to all the filtered GameObject in the scene. Do this for every script effected. This is a manual work but should fix your issues when completed.
Here, is some reason why that's heaping.
1. Your Script Name And your class name isn't same.
2. May be there is an error in your script.
Here, is the few way to resolve it.
1. Make a same name of script and class in to this script.
2. find there is the error? and try to resolve it.
Posting here for historic purposes and if someone from Google ends up here, I strictly had the same problem (I'm on Windows 10) and here's how I fixed it :
If you click on the Console, you should see a blank error. Don't worry, it's a Editor bug, and you can see the Editor Log by selecting the console's window dropdown and selecting Open Editor Log.
For me, the problem was that "Tools\Roslyn\csc" could not be found, something that Unity uses to compile C# files.
I opened C:\Program Files\Unity\Hub\Editor\2019.2.14f1\Editor\Data\Tools\RoslynScripts\unity_csc.bat and I added ".exe" to the line "%APPLICATION_CONTENTS%\Tools\Roslyn\csc" /shared %*
(This line should now be : "%APPLICATION_CONTENTS%\Tools\Roslyn\csc.exe" /shared %*)
Now it works perfectly.
I'm completely new to Unity and game development, but I found that making the error true by entering an incorrect name, then entering the right one seems to "trick" Unity into fixing its error.
I had the same error show up but for different reasons (in case someone ends up here from google).
I was a beginner and named my file with a space in it. I got the same error after that. Make sure to NOT include spaces in your C# script.
One more thing which might help apart from other answers
Make the class which inherits from the MonoBehaviour the first class in the file. It fixed this issue for me.
Checking the console bugs and fix them is a good way to solve the problems "Can't add script component because the script class cannot be found?", although the bug seems to be irrelevant.
This works for me when I fix a bug in the other script.
for me I found out it was a script that I wasn't using which was linked to the player and other scripts that I deleted.
For me, the problem was that there was an error in another script.
Once I fixed the error, I could FINALLY attach my other scripts onto my gameobjects.
I just had this issue where I had a perfect script, no errors, and the same name as it should be but no matter what it wouldn't let me add it to a gameObject.
There was another script that was completely unrelated but it had an error in that and somehow that prevented me from adding my good new script.
Like some folks already posted here - the issue might be of a different code.
I was trying to add a script that was referenced by another one which had errors - it doesn't tell you that is the reason, although visual studio kinda suggests it by showing you the errors in the open script.
Just delete the bigger (errored) script and start adding to the unity project from the basic ones.
I had this issue where I had a good script, no errors, good name, restarting unity, following a tutorial exactly but still had this issue.
The way I fixed this is just deleting this buggy script file and creating it again. It fixed my problem perfectly! Now I could add the script to my game object with no such errors!
Hope this helps you! Cheers!
I'm trying to learn swift language. I have downloaded it for windows 10. Unfortunately, when I tried to run the hello world code (test code), the compiler could not find the file in the workspace even it could not find the workspace folder it self!!!. I tried to change the name of the work-space since it contains a space "My Programs". But, the compiler rejected this change. I have posted with this question some pictures which describe my problem. Any help with this is highly appreciated.
Thank you.
I think that it's not happy with space in between "My" and "Programs". To fix this rename the folder to "My-Programs" and then select the file and again and retry with the new path.
I am working on Box2d application,
my problem is when i move my application's source code from one mac to another mac i got 2349 Errors, i don't know why i am getting this errors.
i even try removing Box2D source from my application from and add again but doesn't work.
if any one know reason and solution please share with me.
Thanks.
Sounds like you are missing some framework. Posting some of the error messages might help us to help you better!
I found solution to my Question.
i got such errors because of change in name of my projects containing folder.
i.e. my working project was at source path /Bubbles/Boxes
on destination mac i changed it to /Bubbles123/Boxes
i changed Bubbles to Bubbles123 that was the problem, it might be creating problem with path.
it works for me now.
Thanks.
I'm new to MATLAB and mrVista.
I'm running Matlab Version 7.8.0.347 (R2009a) 32-bit(win32) from February 12, 2009
OS is Windows 7 Professional
I downloaded the most recent MrVista_hourly.zip and extracted it into my C:\Program_Files_(x86)\MATLAB directory.
I think I need to run mrvInstall, but when I do, I get the following:
EDU>> mrvInstall
Checking VISATSOFT installation.
Windows, 32-bit, installation
Checking and possibly installing .NET framework.
This can take several minutes
Checking for visualization library (.dll) files.
You are missing msvcp70.dll.
So, I'm completely lost at this point. Do I just need to download msvcp70.dll from the net? If so, is there a safe place to download it from? If there's some other way I'm supposed to get mrVista to work from MATLAB, instead of mrvInstall, please let me know that.
Thanks in advance for your help.
EDIT: I've downloaded and installed the dll and still isn't working. I'll go ask on Super User. Thanks for trying to help anyway.
EDIT2: before asking on superuser, I tried once more to solve it myself. Turns out, under the File -> Set Path you have to Add_With_Subfolders the specific vistasoft folder. (Even though I'd already added with subfolders the parent directory where vistasoft lives, that wasn't good enough.) So, once I added the path, and made sure I was in the directory where my data lives, I was able to run the initial command from the tutorial:
mrVista inplane
It opens up very nicely now. No compiles or installs or other commands were actually necessary. Methinks I'm going to go edit a wiki now so no one else has this problem.
There's a pretty comprehensive discussion of Visual C++ runtime DLLs here
Whoever built the file that uses msvcp70.dll (and msvcr70.dll) presumably had Visual Studio 2002 and the right to redistribute that file.
You're probably not going to get much help beyond that because I'm a MatLab user and I have no idea what mrVista is. You've provided no link, no explanation, nothing that someone could use to help you.
See this page on MrVista Wiki:
http://white.stanford.edu/newlm/index.php/Troubleshooting#MESH
There is information on this dll and where to get it from.
I guess "serverfault" is VERY badly named if it's the go-to place for things that have zero to do with servers;-). Maybe the complaint shd actually point to superuser.com?
Me, I've researched the top google hits for this DLL, the very top one seems to be on "dll-files.com" which has no bad reports I can see and is rated green/safe by mcafee, so that's where I would risk downloading it from. Weird that I can't find it on a MSFT site, though.