public AssemblyExportForm(ISldWorks iSwApp, LinkNode node)
        {
            InitializeComponent();
            swApp            = iSwApp;
            BaseNode         = node;
            ActiveSWModel    = swApp.ActiveDoc;
            Exporter         = new URDFExporter(iSwApp);
            AutoUpdatingForm = false;


            jointBoxes = new Control[] {
                textBox_joint_name, comboBox_axis, comboBox_joint_type,
                textBox_axis_x, textBox_axis_y, textBox_axis_z,
                textBox_joint_x, textBox_joint_y, textBox_joint_z, textBox_joint_pitch, textBox_joint_roll, textBox_joint_yaw,
                textBox_limit_lower, textBox_limit_upper, textBox_limit_effort, textBox_limit_velocity,
                textBox_damping, textBox_friction,
                textBox_calibration_falling, textBox_calibration_rising,
                textBox_soft_lower, textBox_soft_upper, textBox_k_position, textBox_k_velocity
            };
            linkBoxes = new Control[] {
                textBox_inertial_origin_x, textBox_inertial_origin_y, textBox_inertial_origin_z, textBox_inertial_origin_roll, textBox_inertial_origin_pitch, textBox_inertial_origin_yaw,
                textBox_visual_origin_x, textBox_visual_origin_y, textBox_visual_origin_z, textBox_visual_origin_roll, textBox_visual_origin_pitch, textBox_visual_origin_yaw,
                textBox_collision_origin_x, textBox_collision_origin_y, textBox_collision_origin_z, textBox_collision_origin_roll, textBox_collision_origin_pitch, textBox_collision_origin_yaw,
                textBox_ixx, textBox_ixy, textBox_ixz, textBox_iyy, textBox_iyz, textBox_izz,
                textBox_mass,
                domainUpDown_red, domainUpDown_green, domainUpDown_blue, domainUpDown_alpha,
                comboBox_materials,
                textBox_texture
            };

            saveConfigurationAttributeDef = iSwApp.DefineAttribute("URDF Export Configuration");
            int Options = 0;

            saveConfigurationAttributeDef.AddParameter("data", (int)swParamType_e.swParamTypeString, 0, Options);
            saveConfigurationAttributeDef.AddParameter("name", (int)swParamType_e.swParamTypeString, 0, Options);
            saveConfigurationAttributeDef.AddParameter("date", (int)swParamType_e.swParamTypeString, 0, Options);
            saveConfigurationAttributeDef.AddParameter("exporterVersion", (int)swParamType_e.swParamTypeDouble, 1.0, Options);
            saveConfigurationAttributeDef.Register();
        }
Example #2
0
        public AssemblyExportForm(ISldWorks iSwApp, LinkNode node)
        {
            InitializeComponent();
            swApp = iSwApp;
            BaseNode = node;
            ActiveSWModel = swApp.ActiveDoc;
            Exporter = new URDFExporter(iSwApp);
            AutoUpdatingForm = false;


            jointBoxes = new Control[] {
                textBox_joint_name, comboBox_axis, comboBox_joint_type,
                textBox_axis_x, textBox_axis_y, textBox_axis_z,
                textBox_joint_x, textBox_joint_y, textBox_joint_z, textBox_joint_pitch, textBox_joint_roll, textBox_joint_yaw,
                textBox_limit_lower, textBox_limit_upper, textBox_limit_effort, textBox_limit_velocity,
                textBox_damping, textBox_friction,
                textBox_calibration_falling, textBox_calibration_rising,
                textBox_soft_lower, textBox_soft_upper, textBox_k_position, textBox_k_velocity
            };
            linkBoxes = new Control[] {
                textBox_inertial_origin_x, textBox_inertial_origin_y, textBox_inertial_origin_z, textBox_inertial_origin_roll, textBox_inertial_origin_pitch, textBox_inertial_origin_yaw,
                textBox_visual_origin_x, textBox_visual_origin_y, textBox_visual_origin_z, textBox_visual_origin_roll, textBox_visual_origin_pitch, textBox_visual_origin_yaw,
                textBox_collision_origin_x, textBox_collision_origin_y, textBox_collision_origin_z, textBox_collision_origin_roll, textBox_collision_origin_pitch, textBox_collision_origin_yaw,
                textBox_ixx, textBox_ixy, textBox_ixz, textBox_iyy, textBox_iyz, textBox_izz,
                textBox_mass, 
                domainUpDown_red, domainUpDown_green, domainUpDown_blue, domainUpDown_alpha,
                comboBox_materials,
                textBox_texture
            };

            saveConfigurationAttributeDef = iSwApp.DefineAttribute("URDF Export Configuration");
            int Options = 0;

            saveConfigurationAttributeDef.AddParameter("data", (int)swParamType_e.swParamTypeString, 0, Options);
            saveConfigurationAttributeDef.AddParameter("name", (int)swParamType_e.swParamTypeString, 0, Options);
            saveConfigurationAttributeDef.AddParameter("date", (int)swParamType_e.swParamTypeString, 0, Options);
            saveConfigurationAttributeDef.AddParameter("exporterVersion", (int)swParamType_e.swParamTypeDouble, 1.0, Options);
            saveConfigurationAttributeDef.Register();
        }