mv.fd_types.Assembly()

    Follow

    PROPERTIES

    library_name (string) - The Library folder name to save the assembly to

    category_name (string) - The Category Folder name to save the assembly to

    assembly_name (string) - Name of the assembly. If blank then the class name will be used without the “PRODUCT_”

    property_id (string)- Prompt page operator ID. This is the bl_id property

    plan_draw_id (string) - the Operator ID that should be called when create the 2D Plan Drawing

    drop_id (string) - the operator Id that should be called when dropping this assembly into the scene. This is the bl_id property

    prompts (dictionary) - The list of prompts to overwrite when creating this assembly (key = Prompt Name, value = Prompt value)

    obj_bp (bpy.types.Object) - The base point of the assembly

    obj_x (bpy.types.Object) - The x Dimension of the assembly

    obj_y (bpy.types.Object) - The y Dimension of the assembly

    obj_z (bpy.types.Object) - The z Dimension of the assembly

    type_assembly (enum string “PRODUCT”, ”INSERT”) -  Determines if the library assembly is an insert or a product

    placement_type (enum string “”, ”Corner”) - Determines if the product is a corner product. This changes default drag and drop behavior.

    mirror_z (boolean) - Determines if the z dimension is mirrored (this is typically used for upper cabinets)

    mirror_y (boolean) - Determines if the y dimension is mirrored (this is typically used for any product that is placed on a wall)

    width (float) - default x dimension of the assembly

    height (float) - default y dimension of the assembly

    depth (float) - default z dimension of the assembly

    height_above_floor (float) - default z location of the assembly

    FUNCTIONS

    add_assembly(file_path) - adds an assembly to this assembly and returns it as a fd_types.Part

    • RETURNS - fd_types.Part
    • file_path (string) - path to the file that stores the assembly to add

    add_object(file_path) - adds an object to the assembly and returns it as a fd_types.Assembly_Object

    • RETURNS - fd_types.Assembly_Object
    • file_path (string) - path to the file that stores the object to add

    add_tab(name="", tab_type='VISIBLE', calc_type="XDIM") - Adds a tab to store prompts on

    • RETURNS - None
    • name (string) - name of string to add
    • tab_type (enum string 'VISIBLE','HIDDEN','CALCULATOR') - type of tab 
    • calc_type (enum string 'XDIM','YDIM','ZDIM') - only used for CALCULATOR type. Determines the dimension that is used to calculate the overall dimension

    add_prompt(name = "", prompt_type = 'DISTANCE', value = False, lock = False, tab_index = 0, items = [], columns = 1, equal = False, export = False) - Adds a prompt to the assembly

    • RETURNS - None
    • name (string) - name of the prompt to add
    • prompt_type (enum string 'NUMBER', 'QUANTITY', 'COMBOBOX', 'CHECKBOX', 'TEXT', 'DISTANCE', 'ANGLE', 'PERCENTAGE', 'PRICE') - type of prompt to add
    • value (string, float, int, boolean) - default value of prompt
    • lock (boolean) - determines if the prompt can be changed in the interface.
    • tab_index (int) - tab index to place prompt on
    • items (list of strings) - only used for combobox type. list of items in combobox.
    • columns (int) - number of columns to display the list in.
    • equal (boolean) - only used when placed on a calculator tab. Determines if the value should be equally calculated.
    • export (boolean) - determines if the prompt will be exported in the XML

    add_empty() - Adds an empty object to the assembly

    • RETURNS - fd_types.Assembly_Object

    add_opening() - Creates and adds an empty opening to the assembly and returns it as an Assembly

    • RETURNS - fd_types.Assembly

    calculator_deduction(expression="",driver_vars=[]) - assigns a formula to the calculator deduction amount. LIMITATION only one calculator can be used on an assembly

    • RETURNS - None
    • expression (string) - the formula to assign
    • drive_vars (list of fd_types.Variable) - list of all of the variables that are used in the expression

    create_assembly() - Must be called first when creating a new assembly

    • RETURNS - None

    replace(assembly) - Replaces the current assembly with the one that is passed in

    • RETURNS - None
    • assembly (fd_types.Assembly) - the assembly to replace the current assembly with

    set_material_pointers(material_pointer_name,slot_name="") - Sets the pointer property for the material slots for every mesh to the material_pointer_name

    • RETURNS - None
    • material_pointer_name (string) - name of the material pointer to assign
    • slot_name (string) - name of the material slot to assign the material pointer to. if this is blank then every slot will be set

    set_name(name) - sets the name of the assembly

    • RETURNS - None
    • name (string) - name to assign to the assembly

    get_prompt(prompt_name) - gets a prompt from the assembly

    • RETURNS - properties.Prompt
    • prompt_name (string) - name of the prompt to get

    get_var(data_path,var_name="") - Returns a variable which can be used in python expressions. 

    • RETURNS - fd_types.Variable
    • data_path (string never None) - data path to retrieve the variable from there are reserved names that can be used otherwise a name of a prompt should be used.
      • dim_x
      • dim_y
      • dim_z
      • loc_x
      • loc_y
      • loc_z
      • rot_x
      • rot_y
      • rot_z
      • world_loc_x
      • world_loc_y
      • world_loc_z
    • var_name - The variable name to use in the python expression. If an empty string is passed in then the data_path is used as the variable name. All spaces are replaced with the underscore character.

    prompt(prompt_name,expression="",driver_vars=[],value=0) - assigns a formula or a value to z_dimension of the assembly 

    • RETURNS - None
    • prompt_name (string) - name of prompt to assign the formula or value to
    • expression (string) - the formula to assign
    • drive_vars (list of fd_types.Variable) - list of all of the variables that are used in the expression
    • value - value to set to the z dimension of the assembly. this is only used when not setting an expression

    x_loc(expression="",driver_vars=[],value=0) - assigns a formula or a value to x_location of the assembly 

    • RETURNS - None
    • expression (string) - the formula to assign
    • drive_vars (list of fd_types.Variable) - list of all of the variables that are used in the expression
    • value - value to set to the x location of the assembly. this is only used when not setting an expression

    y_loc(expression="",driver_vars=[],value=0) - assigns a formula or a value to y_location of the assembly 

    • RETURNS - None
    • expression (string) - the formula to assign
    • drive_vars (list of fd_types.Variable) - list of all of the variables that are used in the expression
    • value - value to set to the y location of the assembly. this is only used when not setting an expression

    z_loc(expression="",driver_vars=[],value=0) - assigns a formula or a value to z_location of the assembly 

    • RETURNS - None
    • expression (string) - the formula to assign
    • drive_vars (list of fd_types.Variable) - list of all of the variables that are used in the expression
    • value - value to set to the z location of the assembly. this is only used when not setting an expression

    x_rot(expression="",driver_vars=[],value=0) - assigns a formula or a value to x_rotation of the assembly 

    • RETURNS - None
    • expression (string) - the formula to assign
    • drive_vars (list of fd_types.Variable) - list of all of the variables that are used in the expression
    • value - value to set to the x rotation of the assembly. this is only used when not setting an expression

    y_rot(expression="",driver_vars=[],value=0) - assigns a formula or a value to y_rotation of the assembly 

    • RETURNS - None
    • expression (string) - the formula to assign
    • drive_vars (list of fd_types.Variable) - list of all of the variables that are used in the expression
    • value - value to set to the y rotation of the assembly. this is only used when not setting an expression

    z_rot(expression="",driver_vars=[],value=0) - assigns a formula or a value to z_rotation of the assembly 

    • RETURNS - None
    • expression (string) - the formula to assign
    • drive_vars (list of fd_types.Variable) - list of all of the variables that are used in the expression
    • value - value to set to the z rotation of the assembly. this is only used when not setting an expression

    x_dim(expression="",driver_vars=[],value=0) - assigns a formula or a value to x_dimension of the assembly 

    • RETURNS - None
    • expression (string) - the formula to assign
    • drive_vars (list of fd_types.Variable) - list of all of the variables that are used in the expression
    • value - value to set to the x dimension of the assembly. this is only used when not setting an expression

    y_dim(expression="",driver_vars=[],value=0) - assigns a formula or a value to y_dimension of the assembly 

    • RETURNS - None
    • expression (string) - the formula to assign
    • drive_vars (list of fd_types.Variable) - list of all of the variables that are used in the expression
    • value - value to set to the y dimension of the assembly. this is only used when not setting an expression

    z_dim(expression="",driver_vars=[],value=0) - assigns a formula or a value to z_dimension of the assembly 

    • RETURNS - None
    • expression (string) - the formula to assign
    • drive_vars (list of fd_types.Variable) - list of all of the variables that are used in the expression
    • value - value to set to the z dimension of the assembly. this is only used when not setting an expression

    Comments