In the past I encountered an issue with 3-Matic not recognizing variables containing one object as that object and instead recognizing them as tuples, i.e. when ‘instance = trimatic.Part’ is called like this: ‘instance.volume’, 3-Matic will return an error saying that the tuple object has no volume attribute. I’ve also encountered many instances that are exceptions to this rule, where the above example does work. To solve this issue when I encounter it, I have been simply subscripting the faulty variable, i.e. instead of ‘instance.volume’, I’ll use ‘instance.volume’.
Now I’m encountering both issues simultaneously with the same line of code.
Here’s the section of code I’m trying to run:
In the past, the function ‘findClosestPoint’ has run like this:
(Notice that the ‘ssm’ variable had to be subscripted for it to run)
Recently, the code has refused to run. Instead, it gives this error when it tries to import the function:
The fix seems obvious, right? I’ll simply fix the ‘findClosestPoint’ function so that it isn’t subscripting that ‘ssm’ variable. Here’s the fix:
Now here’s the new error I get when I try and run the first code:
Notice, the script can now import the function ‘findClosestPoint’ (line 28), but now when it tries using that function in line 32, it can’t because that ‘ssm’ variable isn’t subscripted anymore.
Please help me find a fix to this bug.
Thank you in advance for your assistance,