Go to Post yesterday we completed our bot mechanically and let me tell you.... i was jumping up and down like a 12 year old girl going to a boy-band concert - Leav [more]
Home
Go Back   Chief Delphi > Technical > IT / Communications
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rating: Thread Rating: 12 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #8   Spotlight this post!  
Unread 18-07-2013, 07:41
Michael Hill's Avatar
Michael Hill Michael Hill is offline
Registered User
FRC #3138 (Innovators Robotics)
Team Role: Mentor
 
Join Date: Jul 2004
Rookie Year: 2003
Location: Dayton, OH
Posts: 1,568
Michael Hill has a reputation beyond reputeMichael Hill has a reputation beyond reputeMichael Hill has a reputation beyond reputeMichael Hill has a reputation beyond reputeMichael Hill has a reputation beyond reputeMichael Hill has a reputation beyond reputeMichael Hill has a reputation beyond reputeMichael Hill has a reputation beyond reputeMichael Hill has a reputation beyond reputeMichael Hill has a reputation beyond reputeMichael Hill has a reputation beyond repute
Re: Team 254 Open-Source Release: Cheesy Parts

Quote:
Originally Posted by Cory View Post
That would be PDM, which is from Solidworks and natively integrated. Purely for revision control.

We want to see if there's a way to automatically pull completed drawings from the PDM vault once they're checked in, so that you have one less step to go from the part management system to making parts, but we haven't done that yet.
I have some code that extracts the images from solidworks drawings. I've been working on a PDM system inspired by 254 as well. Don't kill my computer (innovators.mooo.com). Click on Samples.

Basically, solidworks files are OLE files, so you need a library to deal with OLE files. With my PDM I'm setting up for next year, it directly interfaces with the Solidworks PDM. I've hardcoded it in my case (because...well...I just did). The only issue I'm having is that I have to rewrite my database every page load. This is because the Solidworks PDM stores data in a flat text file. When a part is updated, removed, or added, it's reflected in the flat file. I need a better way of "diff"ing the database and my flat file. If you have any ideas, that would be great. I could possibly copy the flat file and run some process in the background and look to see if something's been updated then update the database, but oh well.

Also, the PDM I'm working on will also pull out PDFs of drawings that are saved automagically.

Code:
import OleFileIO_PL

def getpng(request, project_id, partid):
	project = Project.objects.get(id = project_id)
	part = Part.objects.get(id = partid)
	filename = 'D:/VaultData/projects/'+project.name+'/'+part.fileName.replace('.','_')+'/'+part.revision+'/_'+part.fileName[-6:]
	
	try:
		with open(filename1): pass
	except:
		a=1
	
	if (filename):
		assert OleFileIO_PL.isOleFile(filename)
		ole = OleFileIO_PL.OleFileIO(filename)
		png = ole.openstream('PreviewPNG')
		data = png.read()
		return HttpResponse(data, mimetype="image/png")

Last edited by Michael Hill : 18-07-2013 at 07:44.
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 15:08.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi