Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
Skanda_UNI
in reply to: MechMachineMan

@Curtis_Waguespack thank you for your reply. I hope the topic can be moved. Next time i will post the topic in the correct section.

 

@MechMachineMan: Thank you for your answer. I tried your piece of code but it generates an error as follows.

As there is something in german i try to translate what it says:

 

System.InvalidCastException: Der Operator = ist für 'Nothing' und Typ DocumentsEnumerator nicht definiert.

System.InvalidCastException: The operator = is for 'Nothing' and Type DocumentsEnumerator not defined. (hope this makes sense)

bei Microsoft.VisualBasic.CompilerServices.Operators.InvokeObjectUserDefinedOperator(UserDefinedOperator Op, Object[] Arguments)
bei Microsoft.VisualBasic.CompilerServices.Operators.InvokeUserDefinedOperator(UserDefinedOperator Op, Object[] Arguments)
bei Microsoft.VisualBasic.CompilerServices.Operators.CompareObjectEqual(Object Left, Object Right, Boolean TextCompare)
bei LmiRuleScript.Main()
bei Autodesk.iLogic.Exec.AppDomExec.ExecRuleInAssembly(Assembly assem)
bei iLogic.RuleEvalContainer.ExecRuleEval(String execRule)

 

i looked it up and found this:

https://www.experts-exchange.com/questions/26544012/System-InvalidCastException-Operator-'-'-is-not-...

and this

http://www.vbforums.com/showthread.php?541720-RESOLVED-2005-Error-Operator-is-not-defined-for-type-D...

so i assume it is in the For-loop. I tried to exchange the section of your code with the section of my previous one, but this did not work out.

Unfortunately it doesnt say which line the problem is. and how can the "="-Operator not be defined?

 

Thank you for your answer.