Terminal Session - change screen size

tutorial
activities
terminal
p_qa

#1

Hello,
We use EHLLAPI Enhanced mode to automate IBM Personal Communications (TN3270)

  1. In initialization we open IBM P-COMM profile and then create new Terminal Session using default Connection string outputting Terminal.Connection variable

  2. In following workflows for Terminal Sessions we attach to existing Connection using the variable.

The problem is during step 1) terminal screen size is setup based on the current Terminal screen (Login screen resolution is 24x80), after login screen resolution changes to 32x80. But In uipath “terminal host” screen size is not refreshed resulting rows below 25 - 32 are not visible for UIPAth activities.
Activity Move Cursor to blind area (eg 27x40) works, but text activities are failing - get screen text(return only 24 rows), set field value (filed not found).

If we Login manually and navigate to another screen with 32x80 resolution and then create terminal session (step1) It is working fine. It means, screen area is defined during that step and not refreshed anymore.

Is there any method for Terminal.Connection object, we can refresh the resolution, or any atributes we can change?


NullReferenceException: cannot create an L-value from the given expression with property 'size' because the target object is null
#2

I think we are having the same problem for a connection type of UiPath Internal (TN3270).
We need 27x132.


#3

See the attached workflow with an example on how to change the screen size. Note that the attached example will not work as the connection is not properly set.
TerminalChangeScreen.xaml (9.1 KB)


#4

@Silviu

I tried the above and I configured my terminal connection to the settings I always use, but I receive a NullReferenceExeption stating that the expression with property ‘size’ cannot be created because the target object is null.

I copied your solution and I configured the terminal connections, what else can I do to solve this?

I added my project in attachment.

Thanks in advance!

Kr,test4.xaml (8.2 KB)


#5

@ShirleyG

Hi ShirleyG,

For terminal activities - if you need to output terminal connection - there must be at least one activity in the sequence - e.g. - Send Control key (TAB), then TerminalConnection is created after TerminalSession Block is processed.

@Silviu,
Thanks very much for the solution it works! But there is some issue. Invoke Method:ScreenChanged somehow interrupts workflow… It has to be last thing in the workflow, any activities after are ignored. E.g. If you put Write Line activity just after this invoke, it is ignored, even there is no error. This can be easily workaround, but it bit strange.


#6

Hey, @Ada_CZ Thanks for you answer; I followed your advice to insert a flow in the sequence but I still receive the NullReferenceException, I created a new topic especially for this issue: NullReferenceException: cannot create an L-value from the given expression with property 'size' because the target object is null
I also added my adjusted worflow in the new topic.

I hope you or @Silviu know why the workflow still isn’t working for us.

Thanks in advance!


#7

@ShirleyG

When you declare ScreenData Variable, as Default value set “new ScreenData”, seems this solve the issue

NOT CORRECT - see my other post


#8

Hey @Ada_CZ, @Silviu, the NullReferenceException is indeed solved! Thank you for your help, problem now is that our original problem is not solved with the adjustment of the size :cry:

I added a screenshot: we still receive: “error message CPF4169 appeared during OPEN (C G D F)”

Thanks for your help! We appreciate it a lot!

Kr,


#9

Hey just a quick update in case anybody else in the future encounters the same problem: we had a call with UiPath yesterday in order to solve the problem, they pointed out the cause of the issue but they cannot solve it because we have to change the default settings within our firm.


#10

@ShirleyG
Thanks for info.

We realized we made it working by mistake.

If you move Assign Activity for ScreenData into TerminalSession sequence and set Continue on Error property of TerminalSession = True, then it works for us.

The solution i posted before (assign New ScreenData) prevents Error Message, but actual resolution is not changed.
At the moment, we do not know how to change screen size without ignoring errors.


#11

Hey Ada_CZ,

I just wanted to let you know that we solved the problem: we use 3 terminal connections now, we added a third connection to the example of Silviu. In the second connection we just set a disabled sequence (when it’s enabled the flow doesn’t work), for us all problems regarding the screensize are completely solved.

Hope it works for you as well.

Kr,


#12

Hello ShirleyG,
please could you be more specific, how you avoided error during:
assign “new ScreenSize(32, 80)”


#13

Working component to the change screen resolution for terminal.connection
IBM_ScreenReSize.xaml (7.9 KB)