Ignition designer

How to open window of which the script of opening in an error?

Hmm. I don’t quite understand. Please explain what you are attempting, and show the full error details that result. Please use triple-reverse-quotes (these: ``` ) on lines above and below the pasted error details so that they will be neatly formatted.

In fact, I think there is an error in the script of the opening window. the message is " Error executing script for event visionWindowOpened on component SubstrateLoadingView". After the message I can’t access to the window and so to the opening window script.

Without you showing us the full details of the error message, I don’t know how to help you.

I wrote all the message there is no details. The problem is I can 't acces to the script of the window after the error so I don’t know how to correct the problem.

Do you remember what you were doing in that script, in general? What is SubstrateLoadingView?

This is probably a last chance attempt to get your window so you dont have to start over. Also assuming you know a bit about xml.

If you hold shift + right click on the window in the project browser, you can Copy XML to Clipboard. Paste the xml into an editor and search for ‘visionWindowOpened’ and remove the part you think is probably not working correctly. I would assume the entire script should be removed so you can at least re open the window. Maybe copy the script into another file so you can piece it back together later.
After deleting the script, copy the new xml and create a new window, hold shift + right click and select Set xml from Clipboard. I recommend making it as a new window in case the xml isnt quite right you still have the ‘broken’ window to try again. Should be able to at least open it now.

Example of visionWindowOpened section in xml.

<o-c m="put" s="2;O;O">
	<ref>13</ref>
	<arraylist len="1">
		<o cls="com.inductiveautomation.factorypmi.application.binding.action.ActionAdapter">
			<o-c m="setEventSet" s="1;java.beans.EventSetDescriptor">
				<o cls="java.beans.EventSetDescriptor">
					<o-ctor s="5;str;java.lang.Class;[java.beans.MethodDescriptor;java.lang.reflect.Method;java.lang.reflect.Method">
						<str>visionWindow</str>
						<class>com.inductiveautomation.factorypmi.application.components.event.VisionWindowListener</class>
						<array cls="java.beans.MethodDescriptor" len="2">
							<o id="14" cls="java.beans.MethodDescriptor">
								<o-ctor s="2;java.lang.reflect.Method;[java.beans.ParameterDescriptor">
									<method>com.inductiveautomation.factorypmi.application.components.event.VisionWindowListener|visionWindowOpened|1;com.inductiveautomation.factorypmi.application.components.event.VisionWindowEvent</method>
									<null/>
								</o-ctor>
							</o>
							<o cls="java.beans.MethodDescriptor">
								<o-ctor s="2;java.lang.reflect.Method;[java.beans.ParameterDescriptor">
									<method>com.inductiveautomation.factorypmi.application.components.event.VisionWindowListener|visionWindowClosed|1;com.inductiveautomation.factorypmi.application.components.event.VisionWindowEvent</method>
									<null/>
								</o-ctor>
							</o>
						</array>
						<method>FPMIWindow|addVisionWindowListener|1;com.inductiveautomation.factorypmi.application.components.event.VisionWindowListener</method>
						<method>FPMIWindow|removeVisionWindowListener|1;com.inductiveautomation.factorypmi.application.components.event.VisionWindowListener</method>
					</o-ctor>
				</o>
			</o-c>
			<o-c m="setJythonCode" s="1;str"><str>print &apos;test!!&apos;</str></o-c>
			<o-c m="setMethodDescriptor" s="1;java.beans.MethodDescriptor"><ref>14</ref></o-c>
			<o-c m="setScopeStyle" s="1;com.inductiveautomation.ignition.common.script.ScriptScopeStyle"><ref>8</ref></o-c>
			<o-c m="setTarget" s="1;java.awt.Component"><ref>13</ref></o-c>
		</o>
	</arraylist>
</o-c>
1 Like

SubstrateLoadingView is the name of the window

Please take a screen shot of the error and show it here.