Reply

Invoking the Material Tabe dialog

[ Edited ]

 

Hi there

 

Does anyone know if the Solid Edge API provides for invoking the Material Table dialog?

 

Cheers

Stuart

 

Posted by: Stuart Davies
Post date: 10/24/2007 9:58:26 PM

4 REPLIES

RE: Invoking the Material Tabe dialog

[ Edited ]

Hi Stuart,

 

That's easy enough. You can easily learn what the Solid Edge CommandID is by using my free Solid Edge Spy application. Go to my Products page and download it. Once it's up and running, connect to Solid Edge and go to the Event Spy page. Check the ISEApplicationEvents check box in the TreeView and start the command that you're interested in inside of Solid Edge. i.e. Tools -> Material Table. Solid Edge Spy will tell you what the corresponding ComanndID is. From there, using the main Solid Edge Application object, you can call the StartCommand() method.

 

Let me know if you need more info.

 

Posted by: Jason Newell
Post date: 10/24/2007 10:03:36 PM

RE: Invoking the Material Tabe dialog

[ Edited ]

 

Thanks Jason, I'll give that a try.  I did check the command constants collection in the object browser to no avail, but hopefully I'd be able to determine the numeric command value from what you suggest.

 

Cheers

Stuart

 

Posted by: Stuart Davies
Post date: 10/24/2007 10:13:46 PM

RE: Invoking the Material Tabe dialog

[ Edited ]

No problem. Don't forget that each environment has it's own set of CommandConstants. I highly recommend that you use the corresponding environment enum rather than a hard coded number. That means that you need to be aware of what environment you're in so that you can make sure that you use the right one. An easy way to know is to use the SolidEdgeFramework.SolidEdgeDocument interface on the Application.ActiveDocument. From there you can acces the Document Type property easily.

 

Good luck

 

Posted by: Jason Newell
Post date: 10/24/2007 10:19:55 PM

RE: Invoking the Material Tabe dialog

[ Edited ]

 

Yep, I went through the enum constants for each environment but found nothing for this particular command.  The Spy utility can't resolve the command to an enum constant either, but the command value itself (45163) seems to the same for both environments to which this command applies (parts and sheet metal), so hopefully I'll be OK with this.

 

Thanks for your help.  Just need to find a way of determining when the user has dismissed the Material Table dialog now i.e. need it to be modal from my application. 

 

Cheers

Stuart

 

Posted by: Stuart Davies
Post date: 10/24/2007 10:43:06 PM