Start web application with button.

Discuss SolidWorks PDM
User avatar
Hansjoerg
Posts: 115
Joined: Thu Apr 01, 2021 4:17 pm
Answers: 3
x 71
x 60

Start web application with button.

Unread post by Hansjoerg »

Hello everyone,
in PDM you can store a URL for a button. When you press the button, the stored page is opened. I would like to use this function to call up the web interface of our DMS. However, I would like to navigate directly in the DMS to the item selected in the PDM. To do this, however, I have to add the ident number of the component in the PDM to the URL.
Is there a solution for this? Only a static URL is provided in the PDM.

I also have the same problem when calling up our ERP system. Here I can add call parameters to the EXE so that the desired article is opened immediately and the page required for the design is displayed.

You can call up a few values in a process call, but unfortunately the one I need is not included.

Does anyone have any ideas or know of any instructions on how to solve the tasks?
All the "good" news about SWX makes me feel like I'm driving a truck with two trailers straight into a dead end.
User avatar
bnemec
Posts: 1954
Joined: Tue Mar 09, 2021 9:22 am
Answers: 10
Location: Wisconsin USA
x 2562
x 1411

Re: Start web application with button.

Unread post by bnemec »

I've thought about adding ways to link from PDM to our ERP item master screen. Only method I know of (that's not full of work arounds) is to have a "Menu add-in" that adds functions to the right click menu and does the opening in the

Code: Select all

case EdmCmdType.EdmCmd_Menu
From there you can collect the data about the file and assemble your URL.
User avatar
JSculley
Posts: 648
Joined: Tue May 04, 2021 7:28 am
Answers: 55
x 9
x 888

Re: Start web application with button.

Unread post by JSculley »

If the built-in values available when connecting the button to a command string aren't what you need, you need to create a custom add-in and have the button run the add-in. Launching a browser with whatever URL info you want is trivial from within an add-in.
User avatar
AlexB
Posts: 508
Joined: Thu Mar 18, 2021 1:38 pm
Answers: 29
x 274
x 462

Re: Start web application with button.

Unread post by AlexB »

It's possible to use a command string as shown here if your information is available in the given options. This google searches your file name for example.
image.png
image.png (9.21 KiB) Viewed 2582 times
User avatar
jcapriotti
Posts: 1897
Joined: Wed Mar 10, 2021 6:39 pm
Answers: 32
Location: The south
x 1236
x 2029

Re: Start web application with button.

Unread post by jcapriotti »

AlexB wrote: Thu May 16, 2024 2:21 pm It's possible to use a command string as shown here if your information is available in the given options. This google searches your file name for example.
image.png
I've never figured out what the last %% option does. It's not documented. Anyone figure it out?
Jason
User avatar
JSculley
Posts: 648
Joined: Tue May 04, 2021 7:28 am
Answers: 55
x 9
x 888

Re: Start web application with button.

Unread post by JSculley »

jcapriotti wrote: Thu May 16, 2024 9:20 pm I've never figured out what the last %% option does. It's not documented. Anyone figure it out?
I believe it adds an actual % character. Since '%' is used to identity the dynamic triggers (%!1 %2, etc), you need to 'escape' the % with another % if you want the % character in the actual command string.

For example, you might need it in a URL that includes encoded characters.
User avatar
jcapriotti
Posts: 1897
Joined: Wed Mar 10, 2021 6:39 pm
Answers: 32
Location: The south
x 1236
x 2029

Re: Start web application with button.

Unread post by jcapriotti »

Sure wish we could pass variable values
Jason
User avatar
Hansjoerg
Posts: 115
Joined: Thu Apr 01, 2021 4:17 pm
Answers: 3
x 71
x 60

Re: Start web application with button.

Unread post by Hansjoerg »

jcapriotti wrote: Fri May 17, 2024 7:17 pm Sure wish we could pass variable values
I would like that too.
The way I see it, there's no way around an add-in.
Task, Dispatch, Controll logic and now Add in with VB.NET......

Well, you grow with your tasks :D
All the "good" news about SWX makes me feel like I'm driving a truck with two trailers straight into a dead end.
Post Reply