PartCopy Feature in Solid Edge

Pioneer
Pioneer

Hi,

 

I have a Solid Edge Part in which I added partcopy of single part using "Part-Copy" command.

 

I am having requirement of copying all the links associated with the part; thats why currently using revision manager(Mostly working with Assemblies).In this scenario of above part when working with revision manager the document shows that it is having link(which is original part say X.par).

 

Is there any way when working with revision manager to determine whether the     "RevisionManager.Document" is of PartCopy1 feature?

 

Sample code:

RevisionManager.Application objApplication = null;
RevisionManager.Document objDocument = null;
LinkedDocuments objLinkedDocuments = null;

try
{
objApplication = new RevisionManager.Application();
objDocument = objApplication.Open(@"required Path");

objLinkedDocuments = objDocument.get_LinkedDocuments(RevisionManager.LinkTypeConstants.seLinkTypeNormal) as LinkedDocuments;
if (objLinkedDocuments != null && objLinkedDocuments.Count > 0)
{
RevisionManager.Document tempdoc = null;
int count1 = objLinkedDocuments.Count;
for (int c1 = 1; c1 <= count1; c1++)
{
tempdoc = objLinkedDocuments.get_Item(c1) as RevisionManager.Document;
}
if (tempdoc != null)
{
//Want to determing whether this document is of PartCopy feature.

//???????
tempdoc.GetType();
int isAcChild;
tempdoc.IsAsmCopyChild(out isAcChild);
tempdoc.IsDocumentFOP(out isAcChild);
LinkedDocuments tempLinkedDocs = tempdoc.get_LinkedDocuments(RevisionManager.LinkTypeConstants.seLinkTypeNormal) as LinkedDocuments;
if (tempLinkedDocs != null && tempLinkedDocs.Count > 0)
{

}
else
{
string childName = System.IO.Path.GetFileName(tempdoc.FullName);
//tempdoc.Copy(folder + childName);

}
}
}

 

}
catch (Exception)
{

throw;
}

 

2 REPLIES

Re: PartCopy Feature in Solid Edge

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

Hi Onkarp,

there is no property to find out which feature refences the linked document. But if the parent Document is a  Part or SheetMetal, then the link can ony be a Part Copy element.

 

To find the Inter-Part Copy parent Assembly use 

 

objLinkedSubDocuments = tempdoc.get_LinkedDocuments(RevisionManager.LinkTypeConstants.seLinkTypeInterpart) as RevisionManager.LinkedDocuments;

 

Hope this helps

JB 

regards

JB
VS2015, SE ST10

Re: PartCopy Feature in Solid Edge

Pioneer
Pioneer

JB,

 

This workaround does not solve my problem. 

 

I am having part which are having parts created using"Part -Copy" command.

 

 

Thanks,

-Onkarp