//The following runs when a new instance of the class is created public URDFExporterPM(SldWorks swAppPtr) { swApp = swAppPtr; ActiveSWModel = swApp.ActiveDoc; Exporter = new URDFExporter(swApp); Exporter.mRobot = new robot(); Exporter.mRobot.name = ActiveSWModel.GetTitle(); linksToVisit = new List <link>(); docMenu = new ContextMenuStrip(); string PageTitle = null; string caption = null; string tip = null; long options = 0; int longerrors = 0; int controlType = 0; int alignment = 0; string[] listItems = new string[4]; ActiveSWModel.ShowConfiguration2("URDF Export"); #region Create and instantiate components of PM page //Set the variables for the page PageTitle = "URDF Exporter"; //options = (int)swPropertyManagerButtonTypes_e.swPropertyManager_OkayButton + (int)swPropertyManagerButtonTypes_e.swPropertyManager_CancelButton + (int)swPropertyManagerPageOptions_e.swPropertyManagerOptions_LockedPage + (int)swPropertyManagerPageOptions_e.swPropertyManagerOptions_PushpinButton; options = (int)swPropertyManagerPageOptions_e.swPropertyManagerOptions_OkayButton + (int)swPropertyManagerPageOptions_e.swPropertyManagerOptions_CancelButton + (int)swPropertyManagerPageOptions_e.swPropertyManagerOptions_HandleKeystrokes; //Create the PropertyManager page pm_Page = (PropertyManagerPage2)swApp.CreatePropertyManagerPage(PageTitle, (int)options, this, ref longerrors); //Make sure that the page was created properly if (longerrors == (int)swPropertyManagerPageStatus_e.swPropertyManagerPage_Okay) { setupPropertyManagerPage(ref caption, ref tip, ref options, ref controlType, ref alignment); } else { //If the page is not created System.Windows.Forms.MessageBox.Show("An error occurred while attempting to create the " + "PropertyManager Page"); } #endregion }
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(); }
//The following runs when a new instance of the class is created public URDFExporterPM(SldWorks swAppPtr) { swApp = swAppPtr; ActiveSWModel = swApp.ActiveDoc; Exporter = new URDFExporter(swApp); Exporter.mRobot = new robot(); Exporter.mRobot.name = ActiveSWModel.GetTitle(); linksToVisit = new List<link>(); docMenu = new ContextMenuStrip(); string PageTitle = null; string caption = null; string tip = null; long options = 0; int longerrors = 0; int controlType = 0; int alignment = 0; string[] listItems = new string[4]; ActiveSWModel.ShowConfiguration2("URDF Export"); #region Create and instantiate components of PM page //Set the variables for the page PageTitle = "URDF Exporter"; //options = (int)swPropertyManagerButtonTypes_e.swPropertyManager_OkayButton + (int)swPropertyManagerButtonTypes_e.swPropertyManager_CancelButton + (int)swPropertyManagerPageOptions_e.swPropertyManagerOptions_LockedPage + (int)swPropertyManagerPageOptions_e.swPropertyManagerOptions_PushpinButton; options = (int)swPropertyManagerPageOptions_e.swPropertyManagerOptions_OkayButton + (int)swPropertyManagerPageOptions_e.swPropertyManagerOptions_CancelButton + (int)swPropertyManagerPageOptions_e.swPropertyManagerOptions_HandleKeystrokes; //Create the PropertyManager page pm_Page = (PropertyManagerPage2)swApp.CreatePropertyManagerPage(PageTitle, (int)options, this, ref longerrors); //Make sure that the page was created properly if (longerrors == (int)swPropertyManagerPageStatus_e.swPropertyManagerPage_Okay) { setupPropertyManagerPage(ref caption, ref tip, ref options, ref controlType, ref alignment); } else { //If the page is not created System.Windows.Forms.MessageBox.Show("An error occurred while attempting to create the " + "PropertyManager Page"); } #endregion }
public PartExportForm(ISldWorks iSwApp) { InitializeComponent(); Exporter = new URDFExporter(iSwApp); }