I'm using v4.1. Trying to get a comment.input up to change the ser number heading and not working. I'm used to v3.7 and now I have report templates etc. Someone help? Thanks.
V4.1 Comment.Input for Ser#
Collapse
X
-
I wrote myself a little SCRIPT to do this. I wanted to change both the serial number and the rev number. I get those from operator input and load them into 2 ASSIGNED variables in PC-DMIS then pass them on through the SCRIPT call.
Code:Sub main(cn As String,uid As String) Dim App As Object Set App = CreateObject("PCDLRN.Application") Dim Part As Object Set Part = App.ActivePartProgram part.serialnumber=cn 'make the new control number, the serial number part.revisionnumber=uid part.refreshpart part.save Dim repwin As Object Set repwin = part.reportwindow repwin.refreshreport End Sub
Hope this helps, Jan.***************************
PC-DMIS/NC 2010MR3; 15 December 2010; running on 18 machine tools.
Romer Infinite; PC-DMIS 2010 MR3; 15 December 2010.
-
There's gotta be a way to edit the report template header to achieve this. I'm kinda new to v4.1+ templates and stuff. I remember reading something about this.I used to be high on life but I built up a tolerance.
Brown & Sharpe Global Advantage
PCDMIS CAD++ v2011mr2
PH10MQ/SP600M
sigpic
Comment
-
Not in V4.1. It is supposed to be changed in V4.2. I have not gone that far yet, eventhough I am running V4.2 right now.
In V4.1, the header is created the moment you start to execute your program. So whatever the value of the serial number at that time, that's the one that will show up. And it will NOT change unless you refresh. I have dug deep into this with the guru's at hexagon, but this was the best we could come up with. It works nice and reliable. I now use this in every single one of my programs.
Jan.***************************
PC-DMIS/NC 2010MR3; 15 December 2010; running on 18 machine tools.
Romer Infinite; PC-DMIS 2010 MR3; 15 December 2010.
Comment
-
Here is how you can call that script:
Open up a Notepad window, or word pad. Copy the VB text above into the text editor and do a save as: give it a name that looks like *.bas, like CHANGESERNUMBER.BAS . Use PC-DMIS help files to fine tune the VB code. It ain't too difficult.
Make sure you have assigned values to CN and UID! If they are not assigned, you will be in trouble. In my case, I have the following in my PC-DMIS program code, BEFORE the SCRIPT call:
Code:ASSIGN/CN = 1 ASSIGN/UID = 2
Code:CS4 =SCRIPT/FILENAME= C:\PCDMISW\CHANGESERNUMBER.BAS FUNCTION/Main,SHOW=YES,ARG1=CN,ARG2=UID,, STARTSCRIPT/
Jan.***************************
PC-DMIS/NC 2010MR3; 15 December 2010; running on 18 machine tools.
Romer Infinite; PC-DMIS 2010 MR3; 15 December 2010.
Comment
-
Just done 3 weeks drinking it. I like the Hoegaarden Blanche. Ah, the small pleasures of life....
Originally posted by slesholdofthreep View PostHey thanks man! ...almost fogot to mention, I love beer (all time favorite Blanche de Bruges, try it if you can find it)***************************
PC-DMIS/NC 2010MR3; 15 December 2010; running on 18 machine tools.
Romer Infinite; PC-DMIS 2010 MR3; 15 December 2010.
Comment
-
Is there a way to keep the feature IDs from reappearing when this script is used? When the script runs and makes 600+ IDs that were turned off reappear, it causes the program to lock up until I turn them back off.Who am I, where am I, what's going on?
Comment
Related Topics
Collapse
-
by Jan d.This may be more useful to NC users than to anybody else, but here is a sample of code with which you can update the serial number field.
...-
Channel: PC-DMIS Code Samples
12-18-2006, 11:51 AM -
-
by basselopeOkay, I've perused the board and the user manual, but I'm not quite getting what I need - so it's back to the Gurus (thy name be praised...)
...-
Channel: PC-DMIS for CMMs
12-07-2007, 02:42 PM -
-
by TestedI'm trying to change the serial number on my report from a (input) statement. I have gone to a old post and found code for doing it but, I'm missing something....
-
Channel: PC-DMIS for CMMs
10-08-2007, 07:57 AM -
-
by viderI am on PC-DMIS 2014.1 and I have been using a form to collect information such as Work_Order, Operator, and serial number. The work_order and Operator...
-
Channel: PC-DMIS for CMMs
06-23-2015, 11:05 AM -
-
by DaSaloTrying to get going on some scripting and automation. Very new to this so any and all help most appreciated. The following code gives this error :...
-
Channel: PC-DMIS Code Samples
02-03-2012, 06:35 PM -
Comment