2 Replies Latest reply on Dec 23, 2009 1:28 AM by Andre

    How to set component name property ?

    Andre

      Hi,

       

      after migration there are some "duplicate name" issues during pcbfwd which can be resolved by re-placing the components which leads to a new UID.

       

      Giving the component a unique name also helps. Unfortunately *all* Name properties are empty after migration and setting them by hand is tedious work.

       

      I'd like to set them via automation, but neither can access Comp.Name nor Comp.FindAttribute("Name") ... quite annoying.

       

      Automation Reference (->component object) doesn't know a name either .... very poor.

       

       

      Is there any way to do the job ?

       

       

      Regards,

      André

        • 1. Re: How to set component name property ?
          john_dube

          A component is named by adding a label.  Look for Component.Label, if it is Nothing you can use Component.AddLabel, otherwise use Component.Label.TextString to get/set the name.  If there is no label, the name of the component is the UID (unique ID).

           

          John

          • 2. Re: How to set component name property ?
            Andre

            John,

             

            thanky you. But why not call it "label" then ?

            It is somewhat misleading that the real property name is not what is shown in the property window.

             

            Unfortunately this leads to the next question :

             

            During PCB forward I get some "duplicate name" errors on fractured parts.

            As already mentioned the Name/Label is unset, i.e. UID should be taken into account.

             

            How can it be that some UIDs are not unique ?

             

            After deleting and replacing the parts in question (=getting new UIDs) the error is gone.

             

            Any ideas ?

             

             

            Regards,

            André