Start 3DX via Console With User ID and Password

Marc A Jeeves

Start 3DX via Console With User ID and Password

I want to run a session of 3DX CATIA on a server with a service Account and Password, that will be used in conjunction with a Python script to export configured BOM's

 

How do I start a session from Command Line or BAT file with a given user account and password?

thanks

Madaxe

Erica Birch

RE: Start 3DX via Console With User ID and Password
(in response to Marc A Jeeves)

You could create a login ticket from the webtop.  This is achieved from the "Collaboration & Approvals" app, Experience Configuration -> Manage Login Tickets.  Select the correct security context and create a ticket.  I use and "infinite" one.  That gives you a long string that you can then put into your batch command with a -Tk argument.  For example

"C:\Program Files\dassault systemes\B420\win_b64\code\bin\3dexperience.exe" -env ENV -direnv "C:\Temp\ENV" -Url=https://3dspace.3dxxxxx.xxxxx.xxxx:9445/3dspace/ -Tk=MxQUNDNKEoNDdfre4f0GkQ3QzR8dXdmfHV3Z3543

Marc A Jeeves

RE: Start 3DX via Console With User ID and Password
(in response to Erica Birch)

Awesome, does that Get me past the collab space selection also?

Erica Birch

RE: Start 3DX via Console With User ID and Password
(in response to Marc A Jeeves)

Yes, you need to select the CS, ORG and Role when you create the ticket, and so it logs you in with those credentials.

Daniel Koman

RE: Start 3DX via Console With User ID and Password
(in response to Erica Birch)

works flawlessly.  thanks for your help with this!

Daniel Koman

RE: Start 3DX via Console With User ID and Password
(in response to Erica Birch)

Erica,

When launching the client this way, but using batch mode (adding the '-batch' argument), catia starts to load and then aborts.  I'm not seeing anything obvious in the logs.  Do you have any insight on this?  Is it possible to use a login ticket to launch and login to catia in batch mode?

In Reply to Erica Birch:

You could create a login ticket from the webtop.  This is achieved from the "Collaboration & Approvals" app, Experience Configuration -> Manage Login Tickets.  Select the correct security context and create a ticket.  I use and "infinite" one.  That gives you a long string that you can then put into your batch command with a -Tk argument.  For example

"C:\Program Files\dassault systemes\B420\win_b64\code\bin\3dexperience.exe" -env ENV -direnv "C:\Temp\ENV" -Url=https://3dspace.3dxxxxx.xxxxx.xxxx:9445/3dspace/ -Tk=MxQUNDNKEoNDdfre4f0GkQ3QzR8dXdmfHV3Z3543

Erica Birch

RE: Start 3DX via Console With User ID and Password
(in response to Daniel Koman)

I'm afraid I don't know about the -batch command, I haven't tried it. I have an executable that runs outside of the process, it starts the batch file, monitors when 3DX has started, and then runs a vba script that is stored inside 3DX.  When the script has finished, the out of process executable shuts down 3DX.

Erica Birch

RE: Start 3DX via Console With User ID and Password
(in response to Erica Birch)

I don't use -batch to start 3DX, but I do use CATBatchStarter with an input XML file.  The username and password is stored somewhere in that XML input file, I seem to remember it's in the <Connection> tag.  It just works though, it doesn't start and then abort.  The syntax I use is 

"C:\Program Files\Dassault Systemes\B422\win_b64\code\bin\CATSTART.exe" -run "CATBatchStarter -input C:\temp\input.xml" -env MyEnv -direnv "C:\temp\CATEnv"

Quan PHAM

RE: Start 3DX via Console With User ID and Password
(in response to Erica Birch)

Yes I also often use CATBatchStarter and I can confirm that the login information is stored in the <Connection> tag, however it is encoded in Base64 and hence is not that straight forward to exploit. I believe there could be a variable that we can modify in the Environment file to change the format of this tag, but I have had no luck finding it.

In relation to the main thread, any body has an idea how I can get the login ticket or its equivalent if I'm using the On Cloud version of 3DExperience? The Collaboration & Approvals App doesn't give me the option to do so.

Thanks in advance. 

Jeffrey Roark

RE: Start 3DX via Console With User ID and Password
(in response to Quan PHAM)

PLMBATCH_NoPLMIDStream=1 will display readable text in the xml file used with CATBatchStarter.

Jeffrey Roark

RE: Start 3DX via Console With User ID and Password
(in response to Quan PHAM)

Quan, second part of your question. Simple workaround if you can't generate a ticket. You can assigning a user to only one collab space and check remember me option on the login panel. This bypass the authentication panel and role collab space panel. To undo this you can delete the CATSettings and the login process with be back to normal.  To manage login user and roles, I suggest you also set up 2 Icons that point to different CATSettings folders.

Quan PHAM

RE: Start 3DX via Console With User ID and Password
(in response to Jeffrey Roark)

Hello Jeffrey, thank you for the suggestion. I've known about PLMBatch_NoPLMIDStream but it only show the <PLM1SelectObjID> tag but the <ServerLicence> and <Connection> tag still stays unreadable. I can leave a link to the discussion on 3DSwym where I found out about this HERE .

Actually I'm trying to get the login ticket in an attempt to solve this exact problem, as you can see in the proposed solution in the discussion, so sadly I don't think your suggestion can help me in this situation. And nevertheless, I think I must have the administration role of the platform in order to do what you suggest (which I don't) ?

Have a nice day :)