6 Replies Latest reply on May 12, 2017 12:45 PM by Terry Raymond

    How to Break "Linked to Parent Part" Custom Properties

    Tapani Sjoman

      I mirrored some assemblies and parts. All custom properties for these new assemblies are locked. CPs for parts are ok and can be edited.

       

      I deleted assembly properties with a macro and created again (macro) but lock remains. Any proposal how to unlock properties?

       

       

      LockedProperties.png

        • Re: How to Break "Linked to Parent Part" Custom Properties
          Yuvaraj Sakthivel

          Dear sir,

           

          Kindly use the below Code to delete those properties and add custom properties.

           

          Capture.JPG

           

           

          In 16 line is to add Custom properties, If repeat that step with changing Field name, you can able to add Custom properties with respect your requirement.

           

          Regards,

          Yuvaraj S

            • Re: How to Break "Linked to Parent Part" Custom Properties
              Tapani Sjoman

              Dear Yuvaraj,

               

              Thank you for your interest and reply, but I couldn't get it to work. Yes I can delete all the custom properties and create these again but this irritating lock is still there. I found a workaround: just open a new, empty assembly, bring in a mirrored assembly and select "Dissolve Subassembly". Everything works just fine. Would be interesting to find a solution to unlock CPs, but I guess it will be fixed in the next SP.

               

              PS. It would be more easy to copy your code from txt-field :-)

            • Re: How to Break "Linked to Parent Part" Custom Properties
              Irfan Zardadkhan

              Browse to the part using windows explorer and right click on the part and choose properties. You will see a custom tab. You can edit and remove properties from that tab. See attached image.

              Capture.JPG

                • Re: How to Break "Linked to Parent Part" Custom Properties
                  Kevin Thompson

                  This worked for me after saving a part out with the copy custom properties box checked. This caused a mess in our EPDM system so I needed to fix the read-only "Linked to Parent" custom property. Thank you for the macro code. For those who also may find this thread useful I have posted the code above in text form so it is easier to copy without having to retype it again like I did. I could not get the line 16 to compile so I commented it out. I figured it is easier to just add the properties the normal way.

                   

                  Option Explicit
                  Dim swApp As SldWorks.SldWorks
                  Dim swmodel As SldWorks.ModelDoc2
                  Dim swCustPropMgr As SldWorks.CustomPropertyManager
                  Dim bool As Boolean
                  Sub main()

                  Set swApp = Application.SldWorks
                  Set swmodel = swApp.ActiveDoc
                  Dim vconfs As Variant
                  Dim i As Integer
                  ClearCustPrps ("")
                  vconfs = swmodel.GetConfigurationNames
                  For i = 0 To UBound(vconfs)
                  ClearCustPrps (vconfs(i))
                  Next
                  'bool = swmodel.AddCustomInfo("Description",, "")
                  End Sub

                  Sub ClearCustPrps(conf As String)
                  Dim j As Integer
                  Dim vPropNames As Variant
                  Set swCustPropMgr = swmodel.Extension.CustomPropertyManager(conf)
                  If Not swCustPropMgr Is Nothing Then
                  swCustPropMgr.GetAll vPropNames, Empty, Empty
                  If Not IsEmpty(vPropNames) Then
                  For j = 0 To UBound(vPropNames)
                  swCustPropMgr.Delete vPropNames(j)
                  Next
                  End If
                  End If

                  End Sub

                • Re: How to Break "Linked to Parent Part" Custom Properties
                  Adam Pohl

                  Another option, more of a workaround type solution; is to just create the same properties in the configuration specific tab to overwrite the properties under the custom tab. If you use multiple configs on drawings or in assemblies/BOM's you will have to copy and paste your entries to those configurations as well...

                   

                                                config override.png