6 Replies Latest reply on Nov 27, 2018 1:16 AM by robert_davies

    Search for non-common properties


      Hi everybody,


      we recently had a problem with non-common properties in DxDesigner VX.2. There were multiple parts containing one or more non-common properties.

      I found an old "property delete and readd" efm form here in the community. This was my starting point to write a script for searching and readding all properties on all parts of the design. As you could imagine the script is incredibly slow and takes about 30 minutes for a hierarchical design with 3000 parts.

      On the other hand the search function of DxDesigner provide an blazing fast option to search for non-common properties in the design. But as I choose to select all results and delete their selected non-common properties via the properties window, nothing happens. After deleting the properties they are still on the affected parts when I select them afterwards :-(

      For my script I'm wondering if there is a scripting option to check if an attribute is flagged as non-common? Or are there any other indicators for non-common properties that we can check? My goal is to only delete/readd the non-common properties not all properties I can find on a part?

      What is the big difference between the search function of DxDesigner and scripts? Why is it so much faster? Are there any methods to speed up my script beside Application.Visible = False?


      Looking forward for your answers, kind regards,


        • 1. Re: Search for non-common properties

          Hi Dennis,

          First, regarding the performance difference you see between automation and the internal DxDesigner functions, I'll tell you what I think it is, though I'm not certain.  What I think is that we do not have access to the same information as viewdraw.exe has in memory.  We can get it, but we have to go through the sheets and objects on them first, request data from them, process it, then if we are to make a change, we send it back by way of the COM intermediary.  Viewdraw.exe holds all the data all the time, and can write to the database or read from it directly without needing to query sheets and symbols and properties. Again, I don't know this to be a fact, but suspect it's something of that sort.  No other way it could be so fast in comparison with our COM transactions.


          Second, about the common properties issue you're seeing.  I'm curious if you're using DxDatabook.  If so, have you tried the verification windows in DxDatabook to verify component properties match what's in the database?  Also, if you are using Databook, it's just as easy (and much faster) to query the DxDatabook database directly, load what you need into memory, then compare the components to that.  The entire database can be read into datatables in memory in a couple of seconds, then all that information can be accessed very quickly until the application is shut down and the data in memory erased.


          If you are not using DxDatabook, I'm unclear how your parts are getting unwanted properties. If you can fill in more detail about your environment's architecture and how it is that these parts came to have bad data attached to them, it would be helpful to point you in the right direction. If it's a systemic problem then I would look to a different architectural approach to your environment.

          • 2. Re: Search for non-common properties

            Hi Patrick,

            thank you for answering my post.


            First I agree with you that accessing DxDesigner via COM interface is quite slower than directly in memory. But do you know if there is any information on how to improve script speed?

            • If I forget to close the properties window although I use 'application.visible=false' I can see the script updating this window for each property while looping all component properties in the design. This decreases the script speed. Can I hide the properties window via script or do I have to do this manually?
            • Are there any other window related functions than
              Application.SilentMode = True
              Application.SetRedraw False
              Application.Visible = False
              to supress GUI output during the script execution and speed up the script?
            • To collect all hierarchical sheets in the design I use
              For Each objComp In Application.DesignComponents("", sTopBlock, "-1", "STD", True)
                  sPath = objComp.GetName(0)

                  sSchematic = objComp.SymbolBlock.GetName(2)
                  new_dictPaths.Add sPath, sSchematic
              to store all schematics in a dictionary and traverse all sheets by using
              For Each sSheet In Application.SchematicSheetDocuments().GetAvailableSheets(sSchematic)
                  Application.PushPath sTopBlock, sPath, sSheet
              Gathering the schematics takes quite long (about 2 minutes). Is there a faster method to get this information or are there any ways to speed up this code?
            • Is there any way to run the 'Find And Replace Text' DxDesigner function from my script? This function runs very fast and has an built-in option to find non-common properties.


            Second you are absolutely right. We are using DxDatabook.

            The problem we encountered is a new added database column in SQL which one of my collegues forget to add to the "Property Definition Editor" of our central library. So DxDatabook appended the new property as an non-common property to our components without any warnings.

            As we recognized the failure we added the missing property to the library property definitions. But we couldn't find a way to correct the non-common properties with DxDesigner Verification. If I now run Verification it appends a second property with the same name as the corrupted but no non-common property flag (see below "Temperature Coefficient"). The non-common property remains untouched :-(

            So the DxDatabook Verification doesn't seem to work for this issue and I have to solve this either manually or with VB script.


            Kind regards,


            • 3. Re: Search for non-common properties

              Dennis, please get in touch with me offline.  I have a tool I call DxDatabook Utilities. It has a number of functions to address similar problems. I'll share with you.


              It was some ago that I made the tool, so I don't remember everything it does or if it directly solves this issue.  The basic objective was to reconcile differences between parts and their properties in a schematic and the properties in DxDatabook for those parts. 


              If nothing else it may give you some ideas of how to approach the issue a few different ways.  Send me an email at patcashman@gmail.com and I'll get it to you.


              Regarding your specific questions above:


              1. I could not find a way to close the Properties window with automation.  You may be able to do it with UI Automation tools, or the simple way, pop up a message asking the user to do it in return for a faster execution.


              2. Are there any other window related functions . . .     What you see in the help for the application object is what you get.  Nothing else I know of.



              To collect all hierarchical sheets in the design I use . . .. Is there a faster method to get this information or are there any ways to speed up this code?

              Not that I know of. That's how I do it.



              Is there any way to run the 'Find And Replace Text' DxDesigner function from my script?

              Not that I know of.


              What I do is something like what I described which I believe ViewDraw does - collect everything you need at once, store it in memory, then do the work as needed.  That saves the step of going through sheets and parts every time you want to get something before doing the work on it. You can virtualize every object in the design using your own classes, dictionaries, lists, arraylists, and so forth. An example of this behavior can be seen in my 'Find parts and Pins tool.  There's a video of it working here.

              1 of 1 people found this helpful
              • 4. Re: Search for non-common properties

                Just one update on this. In VX.2.1 we have added the capability to update non-common properties automatically, Idea D6337 (Update non-common properties - D6337 ).

                Once you add the non-common property to the property definition file - running Tools - Update other objects - Properties will correct the existing properties in the design.

                2 of 2 people found this helpful
                • 5. Re: Search for non-common properties

                  Hi robert   we are unable to open the link you have provided




                  • 6. Re: Search for non-common properties

                    You need a valid Support Center login to access Ideas. But in essence you follow the instruction in my previous post.