What's new

Is there a way to reference the Global Parameter file associated with an assembly?

albie0803

Alibre Super User
In an assembly, if you click on global parameters, the associated file is listed in the field towards the bottom of the window. Is there a way to get that file and path name to use in a script?

When I do a Save all as, the GP file is included so hopefully there is something like:

GP = assembly.getglobalparameters.filename

If not then there needs to be.

Please!

OR

Can I simply access a GP because it is listed as a parameter for the assembly file?
(I can't try it out until I get in to work tomorrow)
 

idslk

Alibre Super User
Maybe this will help:
Code:
import os
Win = Windows()
FileName = Win.OpenFileDialog('Select a GlobalParameter file', 'GLP Files|*.AD_GLP', '.AD_GLP')
head, tail = os.path.split(FileName)
Test=GlobalParameters(head,tail)
n = len(Test.Parameters)
for i in range(n):
 P_Name = str(Test.Parameters[i])
 Wert = Test.GetParameter(P_Name)
 print P_Name,Wert.Value,Wert.Units

Regards
Stefan
 

ajayre

Alibre Super User
I don't see support for this in the Alibre Design API. Please submit a request to support. Andy
 
Top