How to add a LABEL to history with dispatch?

Discuss SolidWorks PDM
User avatar
mp3-250
Posts: 633
Joined: Tue Sep 28, 2021 4:09 am
Answers: 20
Location: Japan
x 708
x 348

How to add a LABEL to history with dispatch?

Unread post by mp3-250 »

I found in the SOLIDWORKS Knowledge base that it should be possible to add a label to the file history VIA DISPATCH.

I need to add a label after a certain status is set, but I cannot find the label command for the script in the dispatch editor UI.
the only label I see is the jump label to be used inside the script.
I am not sure it is a translation problem or me unable to find the correct submenu...

Any idea?

edit1: forgot to mention it is about "dispatch script" in the post body. it was stated only in the title.
User avatar
bnemec
Posts: 1946
Joined: Tue Mar 09, 2021 9:22 am
Answers: 10
Location: Wisconsin USA
x 2552
x 1401

Re: How to add a LABEL to history with dispatch?

Unread post by bnemec »

Can you share the KB Solution number you mention that talks about adding a label? I'm thinking you might be right about translation issue, more context might help.
User avatar
mp3-250
Posts: 633
Joined: Tue Sep 28, 2021 4:09 am
Answers: 20
Location: Japan
x 708
x 348

Re: How to add a LABEL to history with dispatch?

Unread post by mp3-250 »

SPR481640 is marked as implemented in SW 2019a1.
it explicitly says "history label", but fails to document or elaborate about the procedure...
User avatar
bnemec
Posts: 1946
Joined: Tue Mar 09, 2021 9:22 am
Answers: 10
Location: Wisconsin USA
x 2552
x 1401

Re: How to add a LABEL to history with dispatch?

Unread post by bnemec »

Is this what you're looking for:

In the vault view "Select the file [or folder] Modify->Label..."


https://help.solidworks.com/2019/englis ... olders.htm
image.png


I'm not seeing any access to this from Search tool or SW PDM Add-in. Although once a label is added it can be edited or deleted from file history dialog. Although looks like we can add Label... to user file menu which would add function to Search tool. I don't know how to edit the file context menu in the SW PDM Add-in.
image.png
User avatar
mp3-250
Posts: 633
Joined: Tue Sep 28, 2021 4:09 am
Answers: 20
Location: Japan
x 708
x 348

Re: How to add a LABEL to history with dispatch?

Unread post by mp3-250 »

@bnemec
thank you for the reply.
I stated In the thread title, but I forgot to write it in the post that I was lookIng to do it with dispatch. I have already tested it manually and it works, but automating the task is what I am actually looking for.
sorry for the misunderstanding.
User avatar
bnemec
Posts: 1946
Joined: Tue Mar 09, 2021 9:22 am
Answers: 10
Location: Wisconsin USA
x 2552
x 1401

Re: How to add a LABEL to history with dispatch?

Unread post by bnemec »

mp3-250 wrote: Tue Jan 10, 2023 5:05 pm @bnemec
thank you for the reply.
I stated In the thread title, but I forgot to write it in the post that I was looking to do it with dispatch. I have already tested it manually and it works, but automating the task is what I am actually looking for.
sorry for the misunderstanding.
My mistake. I'm sorry. I saw "...with dispatch" in title but then dismissed it in my head due to ambiguity of the term "label" for conditional jumps in the script.

The SPR is so vague it doesn't indicate how it was implemented and I cannot find anything in the help. As you mentioned the ambiguity of the term "Label" in Dispatch just clouds search results. There's a "Dispatch Label" for flow control then the File/Folder Lable that shows up in file history.

Only thing I can think of is using API.
https://help.solidworks.com/2019/englis ... mbers.html

Maybe @Diaval knows?
User avatar
Diaval
Posts: 87
Joined: Wed Mar 17, 2021 12:01 pm
Answers: 7
Location: Stockholm
x 50
x 110

Re: How to add a LABEL to history with dispatch?

Unread post by Diaval »

bnemec wrote: Tue Jan 10, 2023 5:42 pm ...
Maybe @Diaval knows?
I think the KB must be wrong. I don't know of any way to update a file Label from a Dispatch script. I also have not been able to find any enhancement request asking for this feature. You should create a new enhancement request for this. Sounds like a useful feature for dispatch.
-- To espouse elucidation we must eschew obfuscation
User avatar
mp3-250
Posts: 633
Joined: Tue Sep 28, 2021 4:09 am
Answers: 20
Location: Japan
x 708
x 348

Re: How to add a LABEL to history with dispatch?

Unread post by mp3-250 »

According to Solidworks SPR-481640 was wrong and they took it down from the KB.
I am going to submit an enhancement request.

Update:
ER 1-25242486801
Dispatch: the ability to add (or delete) automatically a label to a file version in its history from a dispatch script. It could be done only manually from explorer.
Product Version in Use : SW2021
Explanation : Problem:
Avoid a specific file version to be deleted by cold storage schema adding a label.
File versions with a "revision label" or a "label" are exempted from cold storage schema, so adding a label to certain version will prevent unwanted deletion.

Legacy workflow was set up to approve solidworks data without creating a "revision label" at the end of the "approved" transition.
We need to preserve those data from accidental deletion and cold storage is also needed.
At the moment the labelling could be done:

1. manually via windows explorer, but on a large data set (10,000+ files) it is unfeasable

2. via PDM API, but it would require programming skills and development budget, time for debug etc for ad hoc solution

Reference:
https://www.javelin-tech.com/blog/2018/ ... -workflow/

The problem shown in "A different SOLIDWORKS PDM revision number workflow approach" is what we are trying to mitigate adding a label to the "approved" status.

Vote up if you think it would be useful!
Post Reply