For a Part, how to set the Default Downstream Location i.e. Folder Location where the Downstream view is to be created
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
For a Part, how to set the Default Downstream Location i.e. Folder Location where the Downstream view is to be created
Folder structure for our product:
Design
Manufacturing
Design Engineer creates part in Design Folder.
MBOM Creator open the part in Manufacturing Associate Part Structure Browser (MPSAB) and then creates a New Downstream Branch of the part. The default location for this is /Default of the Product which can be changed manually by browsing to required location.
We want to change this Default location to /Default/Manufacturing.
Please suggest steps.
- Labels:
-
Manufacturing_Transformation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
It is controlled by a preference.
If you like, you can also write a delegate that uses a logic for number, location and so on.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi Binesh,
We already tried that preference. This preference sets a fixed location for creation of Downstream parts i.e a folder where downstream parts from all the products will be stored. What we need is that Downstream parts of each product should be stored in the Manufacturing folder of that particular product itself.
Regards,
Prasad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi Prasad, I know it is not easy to set this preference in each of the products. I think writing your own delegate overriding DefaultDownstreamLocationDelegate is the elegant. I wish this is more configurable
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
We need exactly the same functionality. Setting the downstream location to a default Manufacturing folder in each product.
@BineshKumar1 Do you happen to have an example on how to create such a custom delegate?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
hi
you can see on the online help
regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you Gregory,
I was looking for this forever!!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi,
PFB custom delegate to achieve this functionality,
public class MyCustomDelegateLocation extends DefaultDownstreamLocationDelegate{
private static final String LOCATION_PATH_SEPARATOR = "/";
@Override
public STAInitialLocationValueBean getSTAInitialLocationValueBean(List<ObjectReference> refs){
//Returns the location of the passed objects
STAInitialLocationValueBean locationBean = new STAInitialLocationValueBean();
for (final ObjectReference ref : refs) {
WTContained persistable = (WTContained) ref.getObject();
final Identifier associative_identifier = EntityUtils.toIdentifier(persistable);
if (persistable instanceof Associative) {
locationBean.addFolderIdForLocation(LOCATION_PATH_SEPARATOR + persistable.getContainerName(),Manufacturing)
locationBean.addInitialLocationForAssociative(associative_identifier, LOCATION_PATH_SEPARATOR + persistable.getContainerName());
}
}
return locationBean;
}
}
Thanks and Regards,
Thiagarajan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hello Thiagarajan,
We tested this example but unfortunately the code is not working properly. Did you test it or adjusted it? Is it working at your system? If yes, can you share the working code?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi Arjen,
Have you tested other code to work properly with DefaultDownstreamLocationDelegate?
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
See this article: https://www.ptc.com/en/support/article/CS278477
Maybe that helps you further.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you for your article, but unfortunately the code is not working properly.
BR,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @IViana
You need to be more descriptive. What does it mean the code does not work properly?
PetrH
