4 Replies Latest reply on Mar 11, 2011 5:23 PM by john_dube

    Place part in DxD 2007.8 attached to cursor in VB Automation

    russ.brown

      I am trying to write a function that places a specific symbol that does not have a part number into my schematic.

       

      set Mypart1 = CompBlock.AddPartInstance("mypartition","","mysymbol.1",X,Y)

       

      I have several issues:

       

      1. I get a number of warnings "Warning 1276: component does not have "Part Number" attribute".  How do I eliminate this message?

      2. I have a .1 symbol and a slightly different .2 version.  If I try to place the specific version, I get an error

           "Error 1086: Invalid block name", but the specific symbol does get placed properly.

      3. I further want to have the code attach the symbol to the cursor automatically so I can move it where I want it.  Does one use CreateObject and MouseMoved to do this?  If so, how?

       

      One might say "Go into the CL View-Symbol View and do it from there".

      That interface is very confusing and training is difficult.

      DxDatabook is excellent in Search mode, but less than useful in CL View-Symbol View.

       

      Another good solution would be to allow me to have my own category of special placeable symbols, as in the way the globals are handled.

        • 1. Re: Place part in DxD 2007.8 attached to cursor in VB Automation
          Vern_Wnek

          Do you have an example of what you are trying to do?

           

          It sounds like yor are duplicating what the tool already does in CL or DxDatabook placement mode.

           

          I would like to understand more of what you are trying to accomplish, and I am sure others would also.

           

          Databook and CL both are powerfull search and place tools - and work great.

           

          By the way, the "Part Number" property is a required property in DxDesigner. It is the "Key" property.

           

          Thanks,

          Vern Wnek

          • 2. Re: Place part in DxD 2007.8 attached to cursor in VB Automation
            russ.brown

            Vern,

             

            One issue is that this is not a "Part" from an Expedition perspective.  So it CANNOT have a part number.  It is only a graphical object that we want to appear on the schematic and is NOT to be packaged.  It could be a logo or some other graphical item that has no layout cell.  The real problem is that we do not want our users moving around in the CL View.  If they place symbols from that perspective, DxDatabook will not pull the correct property values from DMS as necessary for a proper flow.  When they do that, it causes extra unnecessary support calls.  If we had a way to put a list of these up in the top menu bar, like the globals, then we would not need to do this.  Our intent would be to put this under our own drop down menu for now.

             

            Does this clear it up any?

            • 3. Re: Place part in DxD 2007.8 attached to cursor in VB Automation
              Vern_Wnek

              Clear, and here is what I have done in the past.

               

              I use DxDatabook, and create a Library Partition called BOM. These are just Bill of Material Items, Docs, Software, CD, the PCB, etc...

               

              They are not specific to any cell in the Expedition database, they are just graphics, but also have the ability to get the info on the BOM. They can be edited as needed, or placed as is. They are easy to create and very useful for many applications. The Class of MECH allowed us to keep it from Packaging in Netlist flow, In ICDB flow, just set the Forward to PCB property to False.

               

              Take a look, maybe this will work for you too...

               

              DatabookBomItems.png

               

              Thanks,

              Vern Wnek

              • 4. Re: Place part in DxD 2007.8 attached to cursor in VB Automation
                john_dube

                I'm pretty sure that Block.AddComponentMoveMode still works, though it is documented as obsolete, it does exactly what you want.

                 

                     ActiveView.Block.AddComponentMoveMode "symname.1", 0, 0

                 

                John