set IsContentMember to False

set IsContentMember to False

Anonymous
Not applicable
1,195 Views
5 Replies
Message 1 of 6

set IsContentMember to False

Anonymous
Not applicable

Hey,

 

How i cant set this Member 

 

oDocPart.ComponentDefinition.IsContentMember

 

to False ?

 

with this Code as Example i can Handle it with Property but this dosent set the "isContentMember" to False

so some Software indicate it also then as Content Center Part!

 

 

if PartComponentDefinition.IsContentMember = true then
     oDocPart.DisabledCommandTypes = 0
     oDocPart.SubType = "{4D29B490-49B2-11D0-93C3-7E0706000000}"

     On Error Resume Next
     oDocPart.PropertySets.Item("Content Library Component Properties").Delete
     Dim DTPropSet As PropertySet
     Set DTPropSet = oDocPart.PropertySets.Item("Design Tracking Properties")
     DTPropSet.Item("Catalog Web Link").Value = ""
end if

thx for Help

 

Mario

0 Likes
Accepted solutions (1)
1,196 Views
5 Replies
Replies (5)
Message 2 of 6

Anonymous
Not applicable

Hi Mario,

 

You are trying to set the isContentMember to false, but you set the subtype to a catalogproxy object... 

 

From my understanding of what you want to do, try that change :

 

 

if PartComponentDefinition.IsContentMember = true then
     oDocPart.DisabledCommandTypes = 0
     oDocPart.SubType = "{9C88D3AF-C3EB-11D3-B79E-0060B0F159EF}"

     On Error Resume Next
     oDocPart.PropertySets.Item("Content Library Component Properties").Delete
     Dim DTPropSet As PropertySet
     Set DTPropSet = oDocPart.PropertySets.Item("Design Tracking Properties")
     DTPropSet.Item("Catalog Web Link").Value = ""
end if

 

 

0 Likes
Message 3 of 6

Anonymous
Not applicable

Hey,

 

thx for Help but this dosent work

 

the Property IsContentMember = true is always on true

 

i take also the subtype from a new ipt Document but this also dosent change

the Property

 

Mario

0 Likes
Message 4 of 6

Balaji_Ram
Alumni
Alumni
Accepted solution

Hi Mario,

 

You may need to delete another property set that Content Center parts have.

Please try deleting the 5 th and 6 th property sets as mentioned in this blog post and update the document.

 

http://adndevblog.typepad.com/manufacturing/2012/06/determine-whether-a-part-is-a-content-center-par...

 

Regards,

Balaji



Balaji
Developer Technical Services
Autodesk Developer Network

Message 5 of 6

Anonymous
Not applicable

The complete working Solution is very Easy

when How to know its Work Smiley Wink

 

ContentCenter Part convert to CustomPart

 

    Debug.Print oDocPart.ComponentDefinition.IsContentMember
       
        Call oDocPart.PropertySets.Item(6).Delete
        Call oDocPart.PropertySets.Item(5).Delete
        
    Debug.Print oDocPart.ComponentDefinition.IsContentMember
0 Likes
Message 6 of 6

batuhanozmen98
Enthusiast
Enthusiast

Hello Can you share all code for translating standard content member to custom

0 Likes