Page 1 of 1

Is there a way to block Out of Context References in PDM?

Posted: Mon Nov 29, 2021 3:36 pm
by bnemec
image.png
image.png
Is there a way to block Out of Context References in PDM? Maybe at check in or in workflow transition?

Thanks.

Re: Is there a way to block Out of Context References in PDM?

Posted: Tue Nov 30, 2021 12:22 pm
by bnemec
Maybe I asked the question poorly. We would like to prevent Out of Context External References from being approved in our vault. I'm not 100% against them during early development, but would really like them to be severed before the files are approved.

Re: Is there a way to block External References in PDM?

Posted: Fri Dec 03, 2021 1:33 pm
by bnemec
I'm sorry, I'm using the wrong jargon. :oops: Not "Out of Context" references, I think they just call it External Reference.

There's a setting in Solidworks that can prevent a part referencing another part through an assembly.
https://help.solidworks.com/2019/englis ... rences.htm
Users can turn this on and off also, using this in early design can be handy.

But this is what I would like to block from being transitioned to a Released state in PDM. In our dataset each part needs to be self-defining (exception being insert part such as mirrored parts). Sometimes users will leave these references in the models, and it makes a mess down the road.

I'm looking into the EdmCmd_PreState hook for a way to cancel the state change. It looks like EdmCmd_TaskLaunch can be used to halt the transition by setting EdmCmd::mbCancel to true. If I can use SW Document Manager to find if there are external refs or not, I might be able to make our own. To be honest, I don't know if it's worth the time. I was hoping there was a PDM setting for this.

Re: Is there a way to block Out of Context References in PDM?

Posted: Fri Dec 03, 2021 6:06 pm
by jcapriotti
I don't believe PDM even tracks this type of reference. I didn't see it in the contains tab (assy as a child under a part).

I'm sure the API with docmgr could get this condition but it would have to cache the files locally then traverse the structure.

Re: Is there a way to block Out of Context References in PDM?

Posted: Mon Dec 06, 2021 9:18 am
by AlexB
jcapriotti wrote: Fri Dec 03, 2021 6:06 pm I don't believe PDM even tracks this type of reference. I didn't see it in the contains tab (assy as a child under a part).

I'm sure the API with docmgr could get this condition but it would have to cache the files locally then traverse the structure.
This was my thought as well. I wanted to verify it once I got 2021 PDM installed on a test machine. I can't find any reference to blocking external references in parts.

A custom add-in to hook check-in isn't too cumbersome for someone familiar with PDM and API programming.