What's new

saving/modifying a drawing

eboves

Member
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()
 

NateLiquidGravity

Alibre Super User
That won't work. It expects a file path to save your part file. There is no support for working with drawings in Alibre Script. There is very limited support for drawings using the Alibre API -which is difficult to use.
 

eboves

Member
That won't work. It expects a file path to save your part file. There is no support for working with drawings in Alibre Script. There is very limited support for drawings using the Alibre API -which is difficult to use.
Thanks a lot. Do you know if they will do anything about it? meaning more support for drawings?

Quick question, Can I at least modify the fields by using a template that already has the parameters I want to modify? Thanks a lot for all the help.
 
Top