Hi all,
Is there a way to either save a drawing or modify an existing one using a script? I have to create lots of flanges and I need a way to save the part as a drawing an get/display as a note the dimensions. Can this be done using a script?
....
....
Options = []
Options.append(["Work Order",WindowsInputTypes.String, " "])
....
....
my_part = Part('gasket')
XYPlane = my_part.GetPlane('XY-Plane')
gas = my_part.AddSketch('gasket', XYPlane)
gas.AddCircle(0,0,od,False)
gas.AddCircle(0,0,id,False)
thickness = my_part.AddExtrudeBoss("Thickness", gas, thk, False)
for i in range(0, int(holes_qty)):
angle = (360/holes_qty)*i
gas.AddCircle(sin(radians(angle))*bc/2.0,cos(radians(angle))*bc/2.0,holes_dia,False)
################################ I am using the SAVEALL() based on a given URL using the .AD_DRW to save it but is not allowing me. ########################################
new_url = URL + '\\' + work_order + '-' + run + '.AD_DRW'
my_part.SaveAll(new_url)
my_part.Close()
Is there a way to either save a drawing or modify an existing one using a script? I have to create lots of flanges and I need a way to save the part as a drawing an get/display as a note the dimensions. Can this be done using a script?
....
....
Options = []
Options.append(["Work Order",WindowsInputTypes.String, " "])
....
....
my_part = Part('gasket')
XYPlane = my_part.GetPlane('XY-Plane')
gas = my_part.AddSketch('gasket', XYPlane)
gas.AddCircle(0,0,od,False)
gas.AddCircle(0,0,id,False)
thickness = my_part.AddExtrudeBoss("Thickness", gas, thk, False)
for i in range(0, int(holes_qty)):
angle = (360/holes_qty)*i
gas.AddCircle(sin(radians(angle))*bc/2.0,cos(radians(angle))*bc/2.0,holes_dia,False)
################################ I am using the SAVEALL() based on a given URL using the .AD_DRW to save it but is not allowing me. ########################################
new_url = URL + '\\' + work_order + '-' + run + '.AD_DRW'
my_part.SaveAll(new_url)
my_part.Close()