Ejemplo n.º 1
0
        private void addMark(string attributeName, bool customAmount, string barNo = null)
        {
            if (!TeklaStructures.Connect())
            {
                return;
            }
            var macroBuilder = new MacroBuilder();

            if (customAmount)
            {
                macroBuilder.Callback("acmd_create_marks_selected", "", "View_10 window_1");
                macroBuilder.ValueChange("rebar_mark_dial", "gr_rebar_mark_get_menu", attributeName);
                macroBuilder.PushButton("gr_rebar_get", "rebar_mark_dial");
                macroBuilder.TableSelect("rebar_mark_dial", "gr_mark_selected_elements", new int[] { 1 });
                macroBuilder.Activate("rebar_mark_dial", "gr_mark_selected_elements");
                macroBuilder.ValueChange("gr_mark_text", "gr_text", barNo);
                macroBuilder.PushButton("gr_mark_prompt_modify", "gr_mark_text");
                macroBuilder.PushButton("rebar_mark_modify", "rebar_mark_dial");
                macroBuilder.Run();
            }
            else
            {
                macroBuilder.Callback("acmd_create_marks_selected", "", "View_10 window_1");
                macroBuilder.ValueChange("rebar_mark_dial", "gr_rebar_mark_get_menu", attributeName);
                macroBuilder.PushButton("gr_rebar_get", "rebar_mark_dial");
                macroBuilder.PushButton("rebar_mark_modify", "rebar_mark_dial");
                macroBuilder.Run();
            }
        }