using mouse in input selection.

Valued Contributor
Valued Contributor

Hi Friend,

 

Can anyone give good example for input selection using mouse.

 

I need example in "sketch selection using mouse" in extrude.

 

Reason, in model tree more than 5 sketches avaliable all the time.

 

Thanks,

Bala.

8 REPLIES

Re: using mouse in input selection.

Phenom
Phenom

Hi Bala:

 

What is your requirement like?

In the Solid Edge folder, there is an example for mouse in the MouseEvents folder.

Also see this post about setting mouse selection filter.

 

~Tushar

 

Re: using mouse in input selection.

Valued Contributor
Valued Contributor

Thank You for Reply.

 

I need simple example to "select sketch using mouse" in part extrude. or "select template using mouse"

 

please see the attachment.

 

 

Re: using mouse in input selection.

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

As @Tushar mentioned, . Extract the .zip and look for the MouseEvents sample. I took a quick look but couldn't figure out which filter to apply to be able to select a sketch.

Jason Newell
Applications Architect
www.jasonnewell.net

Re: using mouse in input selection.

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

jnewell wrote:

... I took a quick look but couldn't figure out which filter to apply to be able to select a sketch.


AFAIK, there is no direct filter to locate sketches. I typically use the seLocateProfile seLocateGeometry2d filter which allows me to pick 2d geometry entities, from where I can get to its parent profile and its parent sketch through the Parent properties.

Re: using mouse in input selection.

Valued Contributor
Valued Contributor

Hi Martin,

 

Thank you for Reply.

 

Can you please add some code. so i will be very helpful for all.

 

Thanks in advance,

Bala.

Re: using mouse in input selection.

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

Bala,

 

please check out the MouseEvents Sample on Github.

 

If you are going to select a sketch in ASSEMBLY, then it will be much easier than in PART, as you can use the seLocateRelation2d filter to highlight the entire sketch and not just the 2d entities on it.

Re: using mouse in input selection.

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

Bala,

 

you may also look for the Solid Edge Command Macro wizard from Siemens.

In Visual Studio under Tools -> Extensions and Updates..., search Online under the Visual Studio Gallery for "Solid Edge Command Macro" and install it.

Based on this wizard, I created the attached VB.NET command to select a Sketch in either ASM or PART.

You should then check the CmdActivate() and MouseClick1() methods.

Re: using mouse in input selection.

Valued Contributor
Valued Contributor

Thanks you Martin.

 

Also Thanks to Tushar & Jason for your supports on this.