Page 1 of 1

what does "an invalid argument was encountered" really mean?

Posted: Tue May 17, 2022 11:12 am
by Dwight
All

We are running on 2018 and have a large assembly that fires a "an invalid argument was encountered" message occasionally, like a few times week. I can dismiss it and keep working, but like everyone I have crashes and other problems, and I wonder if this message indicates something I can track down and fix.

One of the "other problems" is that fairly frequently when working on an assembly some buttons stop working, buttons such as the "add item" and "add mate" buttons. They flash to show they've been pushed successfully, but nothing happens. Restarting fixes the problem.

Both these issues have started in the last few months.

Any ideas?

Thanks

Dwight

Re: what does "an invalid argument was encountered" really mean?

Posted: Tue May 17, 2022 1:07 pm
by AlexLachance
It's often a file that is corrupt. Depending on the level of corruption, you can:
-Continue working without issue
-Continue working with occasional issues
-Can't continue working because the corrupted file blocks the saving of all files containing it.

Here's a little way I use to try and track down where it's coming from to try and fix it, when the corruption isn't too problematic. Generally I always work with a master assembly that has many levels of sub-assemblies. So in order to find the source, I generally go down one sub-assembly at a time until I stop getting the error. When I stop getting it, it means it's not anywhere inside the current assembly or any other below levels. So I go back up and start looking from the level that was still getting the error message.


Sometimes, if you're lucky, the corruption is very minimal, and you can even get away with fixing the part file that has a minimal corruption by saving it as a new file. For some reason, it seems when a SolidWorks file is being created, it empties up some of the crap it keeps over time.

Re: what does "an invalid argument was encountered" really mean?

Posted: Tue May 17, 2022 1:51 pm
by Dwight
AlexLachance wrote: Tue May 17, 2022 1:07 pm So in order to find the source, I generally go down one sub-assembly at a time until I stop getting the error. When I stop getting it, it means it's not anywhere inside the current assembly or any other below levels. So I go back up and start looking from the level that was still getting the error message.
Corrupt file. Okay, and the method makes sense. It doesn't come up often enough to spend a period of time chasing it, but if I keep track of where I am when it pops up, I should narrow it down eventually.

Thanks

Dwight

Re: what does "an invalid argument was encountered" really mean?

Posted: Tue May 17, 2022 1:59 pm
by AlexLachance
Dwight wrote: Tue May 17, 2022 1:51 pm Corrupt file. Okay, and the method makes sense. It doesn't come up often enough to spend a period of time chasing it, but if I keep track of where I am when it pops up, I should narrow it down eventually.

Thanks

Dwight
I wouldn't be surprised for there to be times where it has other meanings too, so don't take my answer as the entire answer to your question.

Cheers Dwight!

Re: what does "an invalid argument was encountered" really mean?

Posted: Tue May 17, 2022 3:33 pm
by IndianaDave
That just means Solidworks has an argument that you have no hope of winning.
Anything you say to argue your point is invalid...
Kind of like a argument with a woman... No matter how right you are, you're still wrong.

;;

Re: what does "an invalid argument was encountered" really mean?

Posted: Tue May 17, 2022 6:23 pm
by AlexLachance
IndianaDave wrote: Tue May 17, 2022 3:33 pm That just means Solidworks has an argument that you have no hope of winning.
Anything you say to argue your point is invalid...
Kind of like a argument with a woman... No matter how right you are, you're still wrong.

;;
This should be marked as the correct answer :lol: