connect#

Service.connect(url: str = 'http://localhost:8000', username: str = 'nexus', password: str = 'cei', session: str | None = '') None#

Connect to a running service.

Parameters:
urlstr, optional

URL for the service. The default is http://localhost:8000.

usernamestr, optional

Username for the service. The default is "nexus".

passwordstr, optional

Password for the service. The default is "cei".

sessionstr, optional

GUID for the session to work with. The default is "", in which case a new session with its own GUID is created. All created items are then pushed on this session. Visualizations are all filtered so that only items for this session are shown.

Raises:
NotValidServer

The current Service doesn not have a valid server associated to it.

Examples

import ansys.dynamicreporting.core as adr
adr_service = adr.Service(ansys_installation = r'C:\Program Files\ANSYS Inc\v232')
ret = adr_service.connect(url="http://localhost:8010", username='admin', password = 'mypsw')