I can’t get id with EdmCmdNode_ParentDocIDs in IEdmCmdNode interface
IEdmCmdNode cmdNode = (IEdmCmdNode)cmdData.mpoExtra;
int childdocid = (int)cmdNode.GetProperty(EdmCmdNodeProp.EdmCmdNode_ParentDocIDs);
The Error Code is below.
Message "Method returned a COM Variant type that is not Interoperable."
System.StubHelpers.ObjectMarshaler.ConvertToManaged(IntPtr pSrcVariant)
ufukt51:
EdmCmdNode_ParentDocIDs
I have actually not used that before. I would probably use let the compiler infer the type.
var childdocid = cmdNode.GetProperty(EdmCmdNodeProp.EdmCmdNode_ParentDocIDs);
@AmenJlili
i tried that but wasnt run. i get same error
Check if your pdm dlls embed interop types (from the reference properties) are set to false.
ufukt51
February 2, 2022, 12:54pm
5
i checked it unfortunately same error
Managed Debugging Assistant 'InvalidVariant'
Message=Managed Debugging Assistant 'InvalidVariant' : 'An invalid VARIANT was detected during a conversion from an unmanaged VARIANT to a managed object. Passing invalid VARIANTs to the CLR can cause unexpected exceptions, corruption or data loss.'
Might worthwhile to report this to apisupport@solidworks.com
1 Like
That’s a shame 11 years and still a bug
1 Like