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

The Code below gave me the error code:

 

System.NullReferenceException: Object reference not set to an instance of an object.
at iLogic.CadAssemblyUtil.FindComponentOccurrence(Document rootDoc, Object compoName, Boolean topLevelOnly, Boolean inTopLevelContext)
at iLogic.CadCompoOrDoc..ctor(Document rootDoc, Object oName)
at iLogic.ParamDynamicFinder.GetParameterInCompoOrDoc(Object compoOrDocName, String paramName)
at iLogic.ParamDynamic.get_Item(Object compoOrDocName, String paramName)
at LmiRuleScript.Main()
at Autodesk.iLogic.Exec.AppDomExec.ExecRuleInAssembly(Assembly assem)
at iLogic.RuleEvalContainer.ExecRuleEval(String execRule)

 

SyntaxEditor Code Snippet

Select Case Parameter("15231.10:1", "Conveyor_Length")
    Case <=7000
        ActiveSheet.View("VIEW1").Scale=1/45
        ActiveSheet.View("VIEW3").Scale=1/55
        ActiveSheet.View("VIEW5").Scale=1/55
    Case <=11000
        ActiveSheet.View("VIEW1").Scale=1/65
        ActiveSheet.View("VIEW3").Scale=1/75
        ActiveSheet.View("VIEW5").Scale=1/65
    Case <=15000
        ActiveSheet.View("VIEW1").Scale=1/85
        ActiveSheet.View("VIEW3").Scale=1/95
        ActiveSheet.View("VIEW5").Scale=1/85
End Select

 When removed the code worked just fine, just without the parameter based scaling.