Is there a script that can deleate all instance values in a schematic except REFDES?
To delete the Instance Level Property Values for all components that do have a RefDes, I modified the code from above slightly.
Root = GetProjectData.GetiCDBDesignRootBlock(GetActiveDesign)
For Each Com In DesignComponents("",Root,"-1","STD",True)
If Com.RefDes <> "" Then
For Each Att In Com.Attributes
If Att.Name <> "Ref Designator" Then Att.DeleteInstanceValue()
The key here is Att.DeleteInstanceValue(), obviously.
Please try it on a copy of you design first ;-)
This seems like a trick question, so first I'll answer it by asking more questions. By instance, do you mean symbol, since only a symbol can have a REFDES? Further, by instance values, do you mean property (or attribute) values, since REFDES is a symbol attribute? And, do you simply want to nullify the instance values, or completely delete the attribute names? In any event, why would you want to erase or delete all symbol attribute values in a schematic, except REFDES? If you are using DxDatabook to populate the schematic, then removing such data invalidates the packaging process. Certain attributes, such as part number and DXDB_LIBNAME, are necessary. Also, for symbols that have no REFDES attribute, like borders, do you want to eliminate all of their attribute values, making them non-unique? Does any of this make sense?
However, to answer your question directly, yes, a simple script can accomplish your stated goal. The script below will not affect symbols that have no REFDES, but it can be adapted by removing the outer "If" condition.
If Att.Name <> "Ref Designator" Then Call Att.Delete
Good luck with this endeavor.
We use the Databook and all the information comes from there. We don't need to add instance values to symbol properties. But when I pass the information from schematic to the layout with the netlist, then the Designer adds a instance value to: ALT_PKG_LST,DEVICE,PKG_TYPE and REFDES.
The only instance I need is on the property REFDES for the layout.
The problem with the instance values on symbol properties:
We do a review of the components after the got placed in the schematic and passed to layout and we see that we used a wrong decal. We change it in our Database. Now when we update the schematic compoennts with the Databook (New Hierarchical verification window) only the instances of the properties gets updated, the block value remains wrong. Now I copy a part of the schematic the instanced get deleated and it remains the block value with the wrong property.
I don't need to deleate a property, only the instance, because its all perfect defined in the Databook. I only need the instance on REFDES.
Your script will deleate the property or only the instance?
I only want to not have this instances on a property, but on REFDES I need it.
These extra couple of properties that are added, are probably added because users have 'update PDB properties' enabled in the packager GUI.
The script that was provided earlier will delete the property if I am not mistaken. I can look into this later today and see what I can do...
Sent from my Xperia™ by Sony smartphone
I don't have this options.
I have to say we use Mentor PADS.
PADS Designer and PADS Layout with Netlist, not the integrated project.
Our support told us there is no option to avoid the adding of the instances.
Thank you all for your help.
I am new to scripts, how can I start it, how to safe this code to a script file?
Sorry to leave you hanging there ;-)
I am not that familiar with PADS Designer - which version are you running ?
It´s the same Designer like in Xpedition and PADS Professional only with limited functions, but scripts etc. work the same.
I am using version VX.2.4 Update 1
Paste the code into a file. Give it the .vbs extension. In Designer, use the command window and type 'run' and the full path to the vbs file (as in 'run c:\temp\myscript.vbs') Hit return...
Thank you, all works fine now
Is it possible to assign the script to a key or to place it in the toolbar?
The Help says its possible but no instructions how to do it.
Hi - if PADS_VX.2.4 fully supports automation, then the answer is yes. I do not have it installed so I cannot check. I would however expect the PADS VX.2.4 documentation to have the info. Otherwise let us know,and we'll dig up the details...
I found a script that generate me a new Menu and adds there the script, so I can klick and start it.
The documentation of Mentor is very bad and really user unfriendly for beginners.
But I have the complete workaround now for my (Mentor) problem.
Thanks all for your help!
you wrote... " I'm using VX.2.4. Update 1".
Where did you find it? I'm not able to find any VX.2.4 update on SupportNet. Last downloadable version is main release delivered last September 10th.It seems strange to me since also VX2.3 was not updated in last month ( last Update 11 was released one month ago ).
I miss that you are usign Pads VX.2.4 and I was refering to Xpedition VX.2.4
For clarification, Bortolo, here are the most-recent release dates for each product:
Retrieving data ...