Cadence OrCad 17.4 PSPICE - Intro to TCL Scripting Automation

แชร์
ฝัง
  • เผยแพร่เมื่อ 1 ก.พ. 2025

ความคิดเห็น • 12

  • @aqrs269
    @aqrs269 3 หลายเดือนก่อน

    Thank you for the TCL intro! Much appreciated
    Did you do a video on the Custom Plugins subject?

    • @CircuitAnalysis
      @CircuitAnalysis  3 หลายเดือนก่อน +1

      It is on my list, but I am slacking at this point and not sure when I'll get to it. If you want some tips to get going, you can check out other built in scripts in the tclscripts directory:
      C:\Cadence\SPB_17.4\tools\capture\tclscripts
      For a custom script, you would put the guts in a folder in this directory. Then you would make the GUI autoload to integrate into capture every time it starts.
      Any script you put in the "capAutoLoad" folder will be automatically run when capture starts (you can see this in the command window).
      For a random example checkout :
      C:\Cadence\SPB_17.4\tools\capture\tclscripts\capFindAndReplace
      You can see the scripts are in the tcl subfolder and the GUI is in the hybrid subfolder. The GUI is a web page. So the web page creates the menu with inputs that are received in javascript and passed to the tcl scripts.
      You can then see how this GUI is loaded into capture at start using:
      C:\Cadence\SPB_17.4\tools\capture\tclscripts\capAutoLoad\capFindAndReplaceInit.tcl

  • @Nabster5
    @Nabster5 3 ปีที่แล้ว +1

    Cool Video. I have seen TCL scripting used in the semiconductor industry as well. I guess the uses might be much wider than power electronics.

    • @CircuitAnalysis
      @CircuitAnalysis  3 ปีที่แล้ว

      Nice, yeah I really dig that Cadence used a standard language for their OrCAD scripting because other sims like SIMPLIS and PSIM kinda made up their own scripting languages which makes it much harder to find documentation and code examples.

  • @anticlementous
    @anticlementous 2 ปีที่แล้ว

    Ive set up a script to iterate all parts on all schematic sheets, but when I read the reference designators some large percentage of them (40%) output as R? or C? instead of the full reference designator. Do you have any suggestions? I've tried all the API calls related to reference designators such as GetReferenceDesignator, GetReference, & GetDeviceDesignator. It also seems to do the same thing if I use your method of (FindParts R16 true) followed by (GetProperty Reference). Thank you for your help.

    • @CircuitAnalysis
      @CircuitAnalysis  2 ปีที่แล้ว

      Why would you need to query the ref if you already have the ref and are using it to select the part in the first place? I'm not sure why you'd get that but in my schematics there seems to be a "Part Reference" and a "Reference" property, so you could try each and see if one works better for you? If you double click a part to open the property editor you should be able to see the properties and their values. Unfortunately not all properties are shown, but you can use the "Filter by" dropdown to see more or less. Let me know if that helps or not or if you have more questions. Thanks for watching!

    • @anticlementous
      @anticlementous 2 ปีที่แล้ว

      @@CircuitAnalysis My goal is to export all parts as a csv with refdes, x/y coordinates, rotation info, etc. So I'm iterating all parts of the entire project. I only know the reference designators visually by looking at them in the schematic. After looking at your suggestions, it seem that it may not be a tcl script issue, but something with orcad capture schematic because if I double click into properties I see 2 rows with all the same information on the part, but the 1st row has R? in the "Part Reference" & the 2nd row has R16. I really appreciate your time making this video, I wouldn't have made half the progress I have without your efforts!

    • @CircuitAnalysis
      @CircuitAnalysis  2 ปีที่แล้ว

      @@anticlementous Cool! Yeah I just double clicked on one of the refs in my schematic to see which property it was and it says at the top "Part Reference" so I guess that is the one OrCAD is using. In mine "Reference" has the same value but I guess is not used. The properties in OrCAD are kinda a pile. Another trick I learned is that not all properties are visible in the table of properties, so if you create a custom prop and you don't see it or if you think there should be a prop but you don't see it then just create it again and when you put the name in the new property dialog box, the value will auto-fill if it already exists. Then you just add it again and it shows up hah! Anyway, good luck!

    • @CircuitAnalysis
      @CircuitAnalysis  2 ปีที่แล้ว

      @@anticlementous I was just thinking, not sure how you're iterating over all the parts, but if you haven't, make sure you read the part about iterating over all items in a schematic in the www.ema-eda.com/sites/ema/files/resources/files/OrCAD_Capture_TclTk_Extensions.pdf specifically page 31 section 3.2.10. If you use this method then I don't think you'll need to use the FindPart.

    • @anticlementous
      @anticlementous 2 ปีที่แล้ว

      @@CircuitAnalysis Thank you for the suggestion, this is how my tcl script is working using this iterator, I was just using the FindParts function as a test to see if I got different results. I'm not that familiar with orcad capture so I'm not sure why the property editor has 2 cols/rows when you double click a part especially since one of my cols has a R? when the schematic shows the full R16 designator. Even if I reannotate the entire design I still get those R?, C?, etc. on some random fraction of the designator properties, but it shows them all in the schematic gui.