Jump to content

Recording tolerance changes and running script on many programs


---
 Share

Recommended Posts

---

Running 2026 Zeiss Inspect

 

When you record a tolerance change on a Diameter or Distance and then run that script it will change the tolerance and nominal size.

When you record a profile tolerance change and run that script it will not change the tolerance.

When you record a position tolerance change and run that script it will not change the tolerance, but it will allow you to change the True Position location.

Odd behavior...There are many times we have similar programs with the same feature names and I like to run a script to automate changing things over many programs.

 

 

Link to comment
Share on other sites

---

I don't have 26, but i would say - explore that recorded script. Certainly you can remove some of it's content to fulfill your goals.

Link to comment
Share on other sites

---

Please sign in to view this quote.

Please sign in to view this username.

 Interesting. Can you post the code for review? How are your programs set up (for example, is it one part or many stages)?

Link to comment
Share on other sites

Yall may have misunderstood me.

 

Let's assume you have 10 programs that are all identical except they are different parts numbers....now the customer changes the tolerances.

 

You can open all 10 programs and change the tolerances 1 by 1, or you can record yourself doing it once, then loop thru all programs and save them.

 

 

When you record a tolerance change for a diameter or distance it works when you play the script,  But if you record and run a tolerance change on a profile or position  check it won't change it at all.

Link to comment
Share on other sites

I found that using "edit_creation_parameters" is more uniformly than using "edit_properties"

Here is example of editing creation parameters for diameter of a circle and TP of a circle with editing only tolerance

gom.script.sys.edit_creation_parameters (
	element=gom.app.project.inspection['Kružnice 1.Ø'], 
	tolerance={'lower': -0.5, 'tolerance_type': 'two_sided_center', 'upper': 0.6})

gom.script.sys.edit_creation_parameters (
	element=gom.app.project.inspection['Kružnice 1.Poloha'], 
	tolerance=1.2)

Here is example of edit properties - there is tolerance named differently - tol_dimension / tol_gdat

gom.script.sys.edit_properties (
	data=[gom.app.project.inspection['Kružnice 1.Ø']], 
	tol_dimension_lower=-0.9, 
	tol_dimension_lower_warn=0.0, 
	tol_dimension_upper=0.9, 
	tol_dimension_upper_warn=0.0, 
	tol_dimension_use_lower=True, 
	tol_dimension_use_upper=True, 
	tol_dimension_use_warn_level=False, 
	tol_template='')

gom.script.sys.edit_properties (
	data=[gom.app.project.inspection['Kružnice 1.Poloha']], 
	tol_gdat_upper=1.4, 
	tol_template='')

 

  • Like! 1
Link to comment
Share on other sites

Please sign in to view this username.

 

That is what I use to bulk edit dimensions:

gom.script.sys.edit_creation_parameters (
    element=gom.app.project.inspection['ITEM_125_2_TP'], 
    specification={
'combination_specification': 'SZ',
'datum_system': {
'datum_element': gom.app.project.actual_elements['A']
},
'dimension_reference': gom.app.project.inspection['CYL_125.GG'],
'elements': [gom.ActualReference (gom.app.project.inspection['CYL_125'])],
'material_condition': '(M)',
'theoretically_exact_dimensions': {
'position_1': 1.528034632e-06
},
'use_bonus_tolerance': True,
'use_pure_geometry': True,
'zone_modifier': 'cylindrical',
'zone_size': 10.0
}, 
    tolerance=10.0)

 


You can see I set the tolernace to 10mm..but the feature after running this script will not change the tolerance.  Profiles and Position tolerances won't take the change, but distances and diameters will accept the change.

 

 

tol.jpg

Link to comment
Share on other sites

 Share

×
×
  • Create New...