Forum Sign in | Join Forum
     Bookmark and Share


Open Component and Windows Form

Last post 03-09-2010 10:31 PM by JoshT. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 03-03-2010 2:03 PM

    • JoshT
    • Top 25 Contributor
    • Joined on 11-24-2008
    • Posts 8

    Open Component and Windows Form

    I have two seperate questions which are sort of related. I have a bill of materials that I would like to add to a windows form, but everytime I add a form using Visual Studio it adds it as a different class and I can't reference it. The reason I want this in a form is I would like the user to able to click on one of the items on the BOM list and have it open that component, just as the open component command works. I have everything worked out except for opening the form and then opening the component command execution.

     I have tried making a new window, but I'm unsure how to set which components are viewable. But some sort of help on finding the "Open Component" command would be great.

     Another option I suppose would be using a ComboBox in the ribbon, but there is almost not documentation on how to use them.

  • 03-09-2010 7:43 PM In reply to

    • JoshT
    • Top 25 Contributor
    • Joined on 11-24-2008
    • Posts 8

    Re: Open Component and Windows Form

    So I figured out the windows form situation. I have to code each control, meaning I can't use use the visual designer mode to construct the form. I still need help on using or writing an open component command.
  • 03-09-2010 10:31 PM In reply to

    • JoshT
    • Top 25 Contributor
    • Joined on 11-24-2008
    • Posts 8

    Re: Open Component and Windows Form

    Okay so I finally figured this out. I stumbled upon a command called "NewWindow" in one of the examples. So I thought maybe there might be one for other commands similar to that, and there is "OpenComponent". There is no documentation on how to use any of these things or that they even exist. I would like to request there is some documentation on the basic commands that come with the API. Here is a snippet on how it works. How you get the ipart is up to you. This may work with ipart.master but I haven't tried that yet.
    Window.ActiveWindow.SingleSelection = ipart
    Command.Execute("OpenComponent")
Page 1 of 1 (3 items)
Powered by Community Server (Commercial Edition), by Telligent Systems