Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- Be respectful, on topic and if you see a problem, Flag it.
If you would like to contact our Community Manager personally, feel free to send a private message or an email.
Multiple Declaration Warning
mahir
Posts: 1,324 ✭✭✭✭✭
I resumed working on a FS I started a while back, and all of a sudden I'm getting a bunch of strange "multiple declaration" messages in the precondition attached to bound specs. As far as I can tell, there are no duplicate declarations. It's akin to getting flagged for having more than one integer variable, even though they have different names.

https://cad.onshape.com/documents/b31fa08a0fb478e2ec21edc4/w/97c384646af3940a5d60dc28/e/d4f313528a2e81f86b81914b

https://cad.onshape.com/documents/b31fa08a0fb478e2ec21edc4/w/97c384646af3940a5d60dc28/e/d4f313528a2e81f86b81914b
0
Best Answers
-
seems like you imported multiple tabs which possibly both include imports of those types and constants
5 -
mahir said:How can I import someone else's FS without repeating their geometry.FS import?what if you comment/delete the import of geometry.FS in your document?i think this is the problem on the side of opBoolean feature because of this:
5 -
Just seeing this -- the way to deal with redundant imports like that is to import into a namespace.
So if you do
foo::import(...)
you can use foo::whateverFunction
and their exported geometry.fs would go into the namespace foo and not cause symbol conflicts.Ilya Baran \ VP, Architecture and FeatureScript \ Onshape Inc6
Answers
-
seems like you imported multiple tabs which possibly both include imports of those types and constants
5 -
I thought it might have something to do with the import, but the errors remain even if I remove the imported FS.konstantin_shiriazdanov said:seems like you imported multiple tabs which possibly both include imports of those types and constants
Edit: Nope, I stand corrected. Removing the import fixes that particular error. How can I import someone else's FS without repeating their geometry.FS import?0 -
mahir said:How can I import someone else's FS without repeating their geometry.FS import?what if you comment/delete the import of geometry.FS in your document?i think this is the problem on the side of opBoolean feature because of this:
5 -
Duh
Yeah, that works. Although, I'd prefer to control my own imports and not be at the mercy or someone else's imports. Also, what if I had to import multiple custom FS? There should be a way to account for redundant imports, no? 0 -
it should be ok untill those imports doesn't export their importsmahir said:There should be a way to account for redundant imports, no?
. we should ask @mbartlett21 for his reason to export geometry.fs
0 -
@mbartlett21, I'm finally getting back to the 3D Point FS we discussed a while back and am planning to use your opBoolean FS for intersections as you suggested. Can you unexport your geometry.fs import so opBoolean works better as a reference library FS?
0 -
0
-
Nice. Thankskonstantin_shiriazdanov said:
0 -
Just seeing this -- the way to deal with redundant imports like that is to import into a namespace.
So if you do
foo::import(...)
you can use foo::whateverFunction
and their exported geometry.fs would go into the namespace foo and not cause symbol conflicts.Ilya Baran \ VP, Architecture and FeatureScript \ Onshape Inc6 -
@konstantin_shiriazdanovkonstantin_shiriazdanov said:
it should be ok untill those imports doesn't export their importsmahir said:There should be a way to account for redundant imports, no?
. we should ask @mbartlett21 for his reason to export geometry.fs
@mahir
It was for some enums that I used (BooleanOperationType and TopologyMatchType).
It should be fixed now (Please update to V2.1)0



