Your Products have been synced, click here to refresh
from win32com.client import Dispatch from win32com.client import gencache from win32com.client import constants gencache.EnsureModule('{2A09476D-B502-4089-AA46-452D6754CB33}', 0, 9, 1) DmisApp = Dispatch("pcdlrn.Application") DmisApp.Visible = 1 DmisAppEvents = DmisApp.ApplicationEvents DmisApp.WaitUntilReady(40) DmisPart = DmisApp.ActivePartProgram DmisCmds = DmisPart.Commands FeatureTypes = [ "Basic Hit", "CIRCLE (CONTACT)", "CONE (CONTACT)", "CYLINDER (CONTACT)", "Generic Feature", "LINE (CONTACT)", "Measured Circle", "Measured Cone", "Measured Cylinder", "Measured Line", "Measured Plane", "Measured Point", "Measured Round Slot", "Measured Sphere", "Measured Square Slot", "Measured Torus", "PLANE (CONTACT)", "SPHERE (CONTACT)", "VECTOR POINT (CONTACT)", ] DataTypes = [ constants.THEO_X, constants.THEO_Y, constants.THEO_Z, constants.THEO_SX, constants.THEO_SY, constants.THEO_SZ, constants.THEO_EX, constants.THEO_EY, constants.THEO_EZ, constants.THEO_R, constants.THEO_A, constants.THEO_H, constants.THEO_SR, constants.THEO_SA, constants.THEO_SH, constants.THEO_ER, constants.THEO_EA, constants.THEO_EH, constants.THEO_I, constants.THEO_J, constants.THEO_K, constants.TARG_X, constants.TARG_Y, constants.TARG_Z, constants.TARG_SX, constants.TARG_SY, constants.TARG_SZ, constants.TARG_EX, constants.TARG_EY, constants.TARG_EZ, constants.TARG_R, constants.TARG_A, constants.TARG_H, constants.TARG_SR, constants.TARG_SA, constants.TARG_SH, constants.TARG_ER, constants.TARG_EA, constants.TARG_EH, constants.TARG_I, constants.TARG_J, constants.TARG_K, constants.MEAS_X, constants.MEAS_Y, constants.MEAS_Z, constants.MEAS_SX, constants.MEAS_SY, constants.MEAS_SZ, constants.MEAS_EX, constants.MEAS_EY, constants.MEAS_EZ, constants.MEAS_R, constants.MEAS_A, constants.MEAS_H, constants.MEAS_SR, constants.MEAS_SA, constants.MEAS_SH, constants.MEAS_ER, constants.MEAS_EA, constants.MEAS_EH, constants.MEAS_I, constants.MEAS_J, constants.MEAS_K, ] for cmd in DmisCmds: if cmd.TypeDescription in FeatureTypes: for dtype in DataTypes: old = cmd.GetText(dtype, 0) cmd.SetExpression(old + "+0", dtype, 0)
from win32com.client import Dispatch from win32com.client import gencache from win32com.client import constants gencache.EnsureModule('{2A09476D-B502-4089-AA46-452D6754CB33}', 0, 9, 1) DmisApp = Dispatch("pcdlrn.Application") DmisApp.Visible = 1 DmisAppEvents = DmisApp.ApplicationEvents DmisApp.WaitUntilReady(40) DmisPart = DmisApp.ActivePartProgram DmisCmds = DmisPart.Commands FeatureTypes = [ "Basic Hit", "CIRCLE (CONTACT)", "CONE (CONTACT)", "CYLINDER (CONTACT)", "Generic Feature", "LINE (CONTACT)", "Measured Circle", "Measured Cone", "Measured Cylinder", "Measured Line", "Measured Plane", "Measured Point", "Measured Round Slot", "Measured Sphere", "Measured Square Slot", "Measured Torus", "PLANE (CONTACT)", "SPHERE (CONTACT)", "VECTOR POINT (CONTACT)", ] DataTypes = [ constants.THEO_X, constants.THEO_Y, constants.THEO_Z, constants.THEO_SX, constants.THEO_SY, constants.THEO_SZ, constants.THEO_EX, constants.THEO_EY, constants.THEO_EZ, constants.THEO_R, constants.THEO_A, constants.THEO_H, constants.THEO_SR, constants.THEO_SA, constants.THEO_SH, constants.THEO_ER, constants.THEO_EA, constants.THEO_EH, constants.THEO_I, constants.THEO_J, constants.THEO_K, constants.TARG_X, constants.TARG_Y, constants.TARG_Z, constants.TARG_SX, constants.TARG_SY, constants.TARG_SZ, constants.TARG_EX, constants.TARG_EY, constants.TARG_EZ, constants.TARG_R, constants.TARG_A, constants.TARG_H, constants.TARG_SR, constants.TARG_SA, constants.TARG_SH, constants.TARG_ER, constants.TARG_EA, constants.TARG_EH, constants.TARG_I, constants.TARG_J, constants.TARG_K, constants.MEAS_X, constants.MEAS_Y, constants.MEAS_Z, constants.MEAS_SX, constants.MEAS_SY, constants.MEAS_SZ, constants.MEAS_EX, constants.MEAS_EY, constants.MEAS_EZ, constants.MEAS_R, constants.MEAS_A, constants.MEAS_H, constants.MEAS_SR, constants.MEAS_SA, constants.MEAS_SH, constants.MEAS_ER, constants.MEAS_EA, constants.MEAS_EH, constants.MEAS_I, constants.MEAS_J, constants.MEAS_K, ] for cmd in DmisCmds: if cmd.TypeDescription in FeatureTypes: for dtype in DataTypes: old = cmd.GetText(dtype, 0) new = old[[emoticon:33306C418930400BAC28808410F8AC8B]ld.find("+0")] cmd.SetExpression(new, dtype, 0)
© 2024 Hexagon AB and/or its subsidiaries. | Privacy Policy | Cloud Services Agreement |