Community
When using Factory passing a value tp MemberNameIndexInitialValue in c# the compiler will not let me use a long.
I cast ant and then got a COM Error not the right type.
Any one got any ideas
API info says an unsigned long
I have tried system int, int32 ulong etc
int x = 0;
MemberNameIndexInitialValue = x;
COM Error
int declaration work fine in c# but you cannot assign zero value to MemberNameIndexInitialValue property. It must be >= 1, otherwise you get runtime error ("The parameter is incorrect...").
The following code works for me:
PartDocument oiPartDoc = (PartDocument)ThisApplication.ActiveDocument; iPartFactory oFactory = oiPartDoc.ComponentDefinition.iPartFactory; FactoryOptions oOptions = oFactory.FactoryOptions; int x = 9; oOptions.MemberNameIndexInitialValue = x; oiPartDoc.Update();