The preference for the Part Structure Overridable Attribute in Windchill is related to the concept of excluding a component from the Bill of Materials (BOM). In SolidWorks, there is an option to exclude a part from the BOM, which allows the component to remain in the CAD structure within Windchill but not appear in the assembly's part structure.
If this preference is not enabled, Windchill will not track the excluded component and it will remain part of the BOM. To properly exclude a component from the part structure, you must check out and check in the CAD assembly. This ensures that the changes are reflected in the part structure and the excluded component does not appear in the BOM
1)through the manually do the checkout and checkin the CAD, the Extrude from BOM finctionality is working.
2)but if i do through programmatically checkout and checkin the CAD is happaning but the functionality is not working.
for checkout i wrote this:-
public static Workable doCheckOut(Workable epmDocument) {
try {
if (!RemoteMethodServer.ServerFlag) {
return (Workable) RemoteMethodServer.getDefault().invoke("doCheckOut", AddtoWSChekin.class.getName(), null,
new Class[]{EPMDocument.class}, new Object[]{epmDocument});
}
boolean enforce = SessionServerHelper.manager.setAccessEnforced(false);
try {
if (epmDocument != null) {
Workable workable = null;
if (epmDocument instanceof Iterated) {
Iterated it = (Iterated) epmDocument;
epmDocument = (EPMDocument) VersionControlHelper.service.getLatestIteration(it, false);
}
if (WorkInProgressHelper.isCheckedOut(epmDocument)) {
workable = WorkInProgressHelper.isWorkingCopy(epmDocument)
? epmDocument
: WorkInProgressHelper.service.workingCopyOf(epmDocument);
} else {
Folder myFolder = WorkInProgressHelper.service.getCheckoutFolder();
CheckoutLink link = WorkInProgressHelper.service.checkout(epmDocument, myFolder, "AutoCheckOut");
workable = link.getWorkingCopy();
}
return workable;
}
} catch (WTPropertyVetoException | WTException e) {
} finally {
SessionServerHelper.manager.setAccessEnforced(enforce);
}
} catch (RemoteException | InvocationTargetException e) {
}
return null;
}
for checkin i wrote this:
public static void doCheckIn(EPMDocument epmDocument) {
try {
if (!RemoteMethodServer.ServerFlag) {
RemoteMethodServer.getDefault().invoke("doCheckIn", AddtoWSChekin.class.getName(), null,
new Class[]{EPMDocument.class}, new Object[]{epmDocument});
return;
}
boolean enforce = SessionServerHelper.manager.setAccessEnforced(false);
try {
if (epmDocument != null) {
Workable workable = WorkInProgressHelper.isWorkingCopy(epmDocument)
? epmDocument
: doCheckOut(epmDocument); // Get working copy if not already checked out
WorkInProgressHelper.service.checkin(workable, "AutoCheckIn");
}
} catch (WTPropertyVetoException | WTException e) {
} finally {
SessionServerHelper.manager.setAccessEnforced(enforce);
}
} catch (RemoteException | InvocationTargetException e) {
}
}
please help, I am able to do chekout and ceckin the CAD but the WTPart is not removing from the structure.