View Single Post
  #9  
Old 04-18-2011, 03:00 AM
xcuddlex xcuddlex is offline
Member
 
Join Date: Feb 2011
Posts: 11
hi jeff, yes it works
but i wanted to do a function where i can load it directly from my application

this is the code i found in the vizard resources

#Update raw pattern every frame
vizact.onupdate(viz.PRIORITY_INPUT-1,UpdateLargestMarker)

def SavePattern():
"""Displays save dialog for creating pattern from largest raw marker"""
if camera.largestMarker is not None:
parent = win32ui.CreateWindowFromHandle(viz.window.getHandl e())
dlg = win32ui.CreateFileDialog(0,None,None,0,None,parent )
if dlg.DoModal() == win32con.IDOK:
camera.savePattern(dlg.GetPathName(),camera.larges tMarker)

#Save current pattern when spacebar is pressed
vizact.onkeyup(' ',SavePattern)


i want to do the same thing for loading the saved pattern
for example, press ctrl+w to load pattern
but i dont have any idea how to do it because i never used python before
can you provide me any clue on how to do it jeff ? pseudocode is okay too.
i'll try to figure it out, thanks for the reply. really appreciate it
Reply With Quote