The UserDefinedConnection module
PR 22357 Added a new module UserDefinedConnection to parametrics which provides access to the UDCs defined in the job and allows parametrics to convert an end's user_def_idx to a name. For example,
import model import UserDefinedConnection
def is_udc_end(o): return model.IsEnd(o) and o.input.connection_type == model.UserDefined
if __name__ == '__main__': ok = model.LocateSingle('Locate end with UDC:', is_udc_end) if ok: print(UserDefinedConnection.UserDefinedConnection(model.GetSelection()[0].input.user_def_idx).name)
(v7.3)
The UserDefinedConnection module provides access to the user defined connections defined in the Job and allows parametrics to convert an end's user_def_indx to a name. For example:
To get help on the CNC module , you can use the SDS2 Python Prompt and the built-in Python functions dir() and help() :
SDS2 Python Prompt |
>>> import UserDefinedConnection # import the module
GetUDCs(...)
|