Anxiously awaiting our new license keys.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Pages1 2
#2
Macro World / Re: FILE EXPORT_REPORT EXCEL_ONE_PAGE ( , , ) question?
April 19, 2013, 05:13:44 PM
did you ever get this figured out? kind of bored and writing a new macro (outside of the regular work type) sounds like fun. Don't remember off had if the command specifies the tab to which you could write to. Thinking if so, I could append lines in a text file to get a count for which tab to export to. Example...if there are no lines in the text file, export to tab 1. If there are 5 lines, export to tab 6. Of course, this is entirely dependant on the command. Just a thought...
#3
Macro World / Re: Replicating Insight's Auto Survey Function
December 07, 2012, 07:50:21 AM
My apologies for the delayed response.
Please email me some details and I can discuss with our team.
Please email me some details and I can discuss with our team.
#4
Macro World / Re: Replicating Insight's Auto Survey Function
November 14, 2012, 04:51:29 PM
neat little macro, now if I could just get someone to write that check for a laser scanner...
#5
Macro World / Re: Barcode Scanning
October 05, 2012, 06:10:01 AM
I was thinking about modifying the barcode on our load tags, so the operator could scan it and pull up the right project for their parts. Good mistake proofing!
#6
Macro World / Re: Replicating Insight's Auto Survey Function
August 31, 2012, 09:38:02 AM
did this help any?
#7
Macro World / Re: Replicating Insight's Auto Survey Function
August 23, 2012, 02:44:53 PM
This macro will:
1. create a point
2. read the value of that point
3. write X, Y, and Z to a text file
4. read X, Y, and Z, values from that text file and assign them to X2, Y2, and Z2.
This is just an example of how you would write to a text file and then read from it. You would need to manually create the text file where you would like it and then assign that path to the file_name variable. Hope it helps!
1. create a point
2. read the value of that point
3. write X, Y, and Z to a text file
4. read X, Y, and Z, values from that text file and assign them to X2, Y2, and Z2.
This is just an example of how you would write to a text file and then read from it. You would need to manually create the text file where you would like it and then assign that path to the file_name variable. Hope it helps!
Code Select
version "5.0"
#=======================================================
# ---- InnovMetric Software Inc.
# ---- Module : IMInspect
# ---- Version : 12.0.10 ( 12.00.10.5118 )
# ---- Date : Thursday, August 23, 2012 - 14:24:06
# ---- Created By: Jason Reno (Sauder Woodworking Co.)
#-------------------------------------------------------
DECLARE nb_lines
DECLARE x
DECLARE y
DECLARE z
DECLARE x2
DECLARE y2
DECLARE z2
DECLARE file_name "C:\Pointcloud_test.txt"
#Create a dummy point to get values from
FEATURE PRIMITIVE POINT CREATE(10.2,15.2,20.2,"Nominal",,"Test Point")
# Get X, Y, and Z of the dummy point
TREEVIEW PRIMITIVE POINT PROPERTIES POINT GET(x,y,z, "Test Point")
#Write value to a text file
DATA_FILE APPEND LINES($file_name, "$x $y $z")
#Get number of lines in the text file
DATA_FILE PROPERTIES NB_LINES GET("$file_name", nb_lines)
#Read last line in text file and assign those values to a variable.
DATA_FILE READ LINE_FIELD($file_name, $nb_lines, 1, x2,, "On")
DATA_FILE READ LINE_FIELD($file_name, $nb_lines, 2, y2,, "On")
DATA_FILE READ LINE_FIELD($file_name, $nb_lines, 3, z2,, "On")
#8
Macro World / Re: Replicating Insight's Auto Survey Function
August 22, 2012, 02:16:45 PM
I have no idea when it comes to scanning. What I have done is written to an excel file and read values from an excel file, just never in the same macro. I can try to get a base for you to start with and let you get exactly what you need from that.
#9
Macro World / Re: Custom Imput Window
June 07, 2012, 03:48:00 AM
Here is what I did with it. I didn't do a loop to check that the value is 0 or 1, but am doing a check to see that only 1 device is selected.
Code Select
version "5.0"
#====================================================
# ---- InnovMetric Software Inc.
# ---- Module : IMInspect
# ---- Version : 12.0.8 ( 12.00.08.4687 )
# ---- Date : Tuesday, June 05, 2012 - 07:29:29
#----------------------------------------------------
DECLARE device_a "Faro Arm"
DECLARE device_a_use
DECLARE device_b "CimCore Arm"
DECLARE device_b_use
DECLARE device_c "PolyWorks Probe Simulator"
DECLARE device_c_use
DECLARE macro_error
MACRO INPUT MULTIPLE_PARAMETERS("Device Selection", "Select a device to use:", {"integer", " $device_a (0/1)", $device_a_use, "integer", " $device_b (0/1):", $device_b_use, "integer", " $device_c (0/1):", $device_c_use}, device_a_use, device_b_use, device_c_use)
MACRO GET_ERROR_STATUS(macro_error)
IF $macro_error == "Error"
MACRO PAUSE ("Cancel", "Selection Cancelled.")
MACRO END
ENDIF
IF EXPR_I($device_a_use + $device_b_use + $device_c_use) >= 2
MACRO PAUSE ("Error.", "Select only 1 Device.")
MACRO END
ENDIF
IF $device_a_use == 1
PROBE DEVICE($device_a)
PROBE DEVICE CONNECT ( "On" )
MACRO GET_ERROR_STATUS(macro_error)
IF $macro_error == "Error"
MACRO PAUSE ("Error", "Could not connect to $device_a.")
ENDIF
ENDIF
IF $device_b_use == 1
PROBE DEVICE($device_b)
PROBE DEVICE CONNECT ( "On" )
MACRO GET_ERROR_STATUS(macro_error)
IF $macro_error == "Error"
MACRO PAUSE ("Error", "Could not connect to $device_b.")
ENDIF
ENDIF
IF $device_c_use == 1
PROBE DEVICE($device_c)
PROBE DEVICE CONNECT ( "On" )
MACRO GET_ERROR_STATUS(macro_error)
IF $macro_error == "Error"
MACRO PAUSE ("Error", "Could not connect to $device_c.")
ENDIF
ENDIF
#10
Macro World / Re: Custom Imput Window
June 06, 2012, 02:54:40 PM
Not a problem, I'll post it when I get back to work tomorrow.
#11
Macro World / Re: Custom Imput Window
June 06, 2012, 09:08:22 AM
I agree, I have been hoping that there would be some radio and dropdown options coming. I have only been using PW for about a 18 months and that is my only gripe. With all of the other capabilities, I'm very pleased. Let me know if you would like the code for this.
#13
Macro World / Probe Calibration (MACRO)
June 05, 2012, 03:28:19 AM
I wrote this little macro because we kept forgetting to connect to our device(s) before clicking the device properties button to calibrate. We primarily use FARO arms and we have a few Romer arms, so that is what the macro is written for. Enjoy!
Code Select
version "5.0"
#=======================================================
# ---- InnovMetric Software Inc.
# ---- Module : IMInspect
# ---- Version : 12.0.6 ( 12.00.06.4483 )
# ---- Date : Wednesday, March 14, 2012 - 10:01:54
#-------------------------------------------------------
DECLARE macro_error
PROBE DEVICE ( "Faro Arm" )
PROBE DEVICE CONNECT ("On")
MACRO GET_ERROR_STATUS(macro_error)
IF $macro_error == "Error"
PROBE DEVICE ( "CimCore Arm" )
PROBE DEVICE CONNECT ("On")
MACRO GET_ERROR_STATUS(macro_error)
IF $macro_error == "Error"
MACRO PAUSE ("Error", "Could not connect to FARO arm or CimCore arm.")
MACRO END
ENDIF
ENDIF
PROBE DEVICE PROPERTIES
#14
Macro World / Re: Custom Imput Window
June 04, 2012, 03:37:12 PM
How partial are you to using radios? I could do something with a dialogue box where you would enter either 1 or 0. If interested, let me know which devices to add to the list. Would you want to just select the device or select and connect?
#15
Macro World / Re: Open excel file after it has been exported
May 06, 2011, 03:32:42 AM
Solution:
DOS prompts must be used in order for this to happen:
SYSTEM ("START EXCEL.EXE ${_QUOTES}Insert path to file here${_QUOTES}")
DOS prompts must be used in order for this to happen:
SYSTEM ("START EXCEL.EXE ${_QUOTES}Insert path to file here${_QUOTES}")
Pages1 2