I keep on getting a error code when trying to import a model into forge. Any ideas what this could be?
Details: System.ArgumentException: The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))
[08/21/2023 13:22:52] at System.RuntimeType.ForwardCallToInvokeMember(String memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData& msgData)
[08/21/2023 13:22:52] at Inventor.RenderStyles.get_Item(Object Index)
[08/21/2023 13:22:52] at iLogic.ComponentInRule.set_Color(Object componentName, String value)
Hi @kevinFDQS2. I do not use Forge, and have no experience with it, but the error message seems to indicate that it is encountering the first error at a line of code that is attempting to get a specific 'RenderStyle' from a RenderStyles collection. Those object types are outdated, but they have maintained support for them for a number of years. They may have ended the support for those object types. The RenderStyles were replaced by Assets around 2013. The following is a link to that announcement.
Consistent Materials (Materials and Appearances)
Edit: By the way, the second error seems to be happening at a line of code that is using something like:
Component.Color("ComponentName") = "Red"
...(but not necessarily that component name or that color).
Wesley Crihfield
(Not an Autodesk Employee)
Can't find what you're looking for? Ask the community or share your knowledge.