Author Message
 Post subject: Python User Programmable Scripts
PostPosted: 18 May 2016, 20:32 
Offline

Joined: 05 Jan 2013, 01:13
Posts: 2
Last year I worked on a digi-key scraper called Part Sourcerer (https://github.com/CaleMcCollough/Part_Sourcerer) that downloads meta data about parts, 3d models, and data sheets. My ambition is to use it to optimize the BOM costs in DipTrace, and download and import all the metadata and link all the 3d models. We need a plugin interface for DipTrace where we can use Python. This would be extremely powerful, and would set DipTrace apart from the crowd.

The way I've been automating it is that I have the web addresses to search for the component on Digi-Key stored in the part library. For example, all my 0803 resistors have a link them that allows me to shop for the part on Digi-Key. I then refined my search in the browser, and I save the search URL in with the part library in a Data field called "Supplier 1 Search URL". Once I've picked out the cheapest part, you then save the URL into DipTrace as a field as "Supply 1 URL". From there, the software will load the URL for the part, download all of the metadata about the part along with ordering information, and I need to be able to insert this information into the fields in DipTrace. Right now it just downloads the metadata, datasheets, 3d models, etc.

My only solution right now is export the project to DipTrace ASCII, then process it, or to just run the script on a CSV version of the BOM. It would be really nice if DipTrace had a feature that would export the design to ASCII, perform text processing using Python, then import the modified ASCII and push the changes. This could be done without the aid of a DLL code redesign.

I am looking for some people to help with this open source project. It could benefit you.


Top
 Profile  
 
 Post subject: Re: Python User Programmable Scripts
PostPosted: 09 Jul 2016, 06:26 
Offline

Joined: 09 Jul 2016, 06:21
Posts: 6
+1


Top
 Profile  
 
 Post subject: Re: Python User Programmable Scripts
PostPosted: 17 Aug 2016, 20:57 
Offline

Joined: 06 May 2012, 00:32
Posts: 1
I've actually come up with a way to automatically import/export DipTrace schematics to/from the ASCII format.

It's super sketchy and probably flakey, but it works for my files -- I run DipTrace under Wine inside of a Docker container and run AutoHotKey scripts to run menu shortcuts and click through the dialogs.

Docker image on DockerHub:
https://hub.docker.com/r/devanlai/diptrace-export/

Here's an example where I use with CircleCI to extract each schematic page as a PNG whenever I push to the repo:
https://github.com/devanlai/dap42-hardware/blob/master/render-schematic.sh

Example output:
https://15-48033573-gh.circle-artifacts.com/0//home/ubuntu/dap42-hardware/renders/DAP42v2/DAP42.png

As you're probably thinking, yes, this is a very fragile solution that is difficult to tweak and may randomly stop working at any moment.
Consider the existence of this "solution" as an emphatic +1 on the request for programmatic import/export support.


Top
 Profile  
 
 Post subject: Re: Python User Programmable Scripts
PostPosted: 18 Aug 2016, 08:33 
Offline
Technical Support

Joined: 09 Jun 2010, 08:12
Posts: 208
Thank you all for the posts. We plan to do it in a future, it is in our todo list.
Now we create the additions to High Speed feature.

Serg Luts
DipTrace Team


Top
 Profile  
 
 Post subject: Re: Python User Programmable Scripts
PostPosted: 22 Aug 2016, 09:00 
Offline

Joined: 10 Jan 2015, 02:00
Posts: 188
Location: Anaheim, CA 92806
ponyatov wrote:
+1


What is +1?

_________________
PCB Manufacturing


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group