Register  Login   Search
 Latest Posts Minimize

RE: Remove unused Linestyles
Solid Edge Programming
09/03/2010 7:45 AM
jr199

Remove unused Linestyles
Solid Edge Programming
09/02/2010 1:25 PM
kmwolf

How to read block in a dft file without opening the dft file?
Solid Edge Programming
09/02/2010 9:02 AM
assassin.007

Inquire Element - Measure Diameter by VBA
Solid Edge Programming
09/02/2010 6:40 AM
JM

dissolve Reference to SubASM - how to??
Solid Edge Programming
09/02/2010 2:23 AM
LIHE

RE: Using Insight on a 64 bit Computer
Solid Edge General
08/31/2010 7:47 AM
Atom

Using Insight on a 64 bit Computer
Solid Edge General
08/30/2010 3:06 PM
Atom

RE: File Properties using VB.NET leave file locked
Solid Edge Programming
08/30/2010 9:57 AM
JBZ

RE: File Properties using VB.NET leave file locked
Solid Edge Programming
08/30/2010 3:20 AM
jr199

File Properties using VB.NET leave file locked
Solid Edge Programming
08/27/2010 4:36 PM
JBZ

RE: XLS link to the part
Solid Edge Programming
08/27/2010 4:11 PM
JBZ

RE: Save As for each view -- how 2 wait for SE !
Solid Edge Programming
08/27/2010 3:27 AM
jr199

vb6 se20 - solid edge Part - Hole size
Solid Edge Programming
08/26/2010 9:42 PM
cadraw

vb6 se20 - how to Drawing View Depth
Solid Edge Programming
08/26/2010 9:24 PM
cadraw

RE: Problem while getting the objects using "SelectSet" property.
Solid Edge Programming
08/26/2010 7:35 AM
jr199

RE: About the "Callout"!
Solid Edge Programming
08/26/2010 3:42 AM
fatkids

RE: Save As for each view -- how 2 wait for SE !
Solid Edge Programming
08/25/2010 3:28 AM
ErWo

RE: help to transfer C# codes as following to C++ codes?
Solid Edge Programming
08/24/2010 10:12 PM
assassin.007

RE: FamilyMembers Panel problem (refreshing)
Solid Edge Programming
08/24/2010 3:47 PM
peter6396

Save As for each view -- how 2 wait for SE !
Solid Edge Programming
08/24/2010 4:09 AM
LIHE

RE: FamilyMembers Panel problem (refreshing)
Solid Edge Programming
08/24/2010 1:28 AM
ErWo

help to transfer C# codes as following to C++ codes?
Solid Edge Programming
08/23/2010 10:34 PM
assassin.007

Problem while getting the objects using "SelectSet" property.
Solid Edge Programming
08/22/2010 7:59 AM
pratap

FamilyMembers Panel problem (refreshing)
Solid Edge Programming
08/20/2010 4:12 AM
peter6396

RE: AddLoftedFlange in SheetMetal
Solid Edge Programming
08/19/2010 4:33 AM
jason.newell

RE: PartList Positioning
Solid Edge Programming
08/19/2010 2:10 AM
ErWo

RE: Alternate Assemblies
Solid Edge Programming
08/18/2010 4:54 PM
peter6396

RE: About the "Callout"!
Solid Edge Programming
08/18/2010 7:39 AM
Danisan

XLS link to the part
Solid Edge Programming
08/18/2010 5:23 AM
romanes

About the "Callout"!
Solid Edge Programming
08/17/2010 2:49 AM
fatkids


  
 Forums Minimize

Subject: How to detect selected object type ?
Prev Next
You are not authorized to post a reply.

Author Messages
Juraj JoobUser is Offline
Site Member
Site Member
Posts:25

01/11/2010 4:28 PM  

I select object in SE assembly by creating command using Application.CreateCommand method. I using mouse settings:

Command.
Mouse.WindowTypes = 1; //only graphic window   
Command.Mouse.EnabledDrag = false;
Command.Mouse.EnabledMove = true;
Command.Mouse.InterDocumentLocate = true;
Command.Mouse.LocateMode = (int)SolidEdgeConstants.seLocateModes.seLocateQuickPick;
Command.Mouse.ClearLocateFilter();
Command.Mouse.AddToLocateFilter((int)SolidEdgeConstants.seLocateFilterConstants.seLocatePart); //occurrence and suboccurrence objects, if i undestand it well

How to detect selected object type?

When i stop mouse moving above subassembly and wait, until appears icon QuickPick, then i click rigt mouse button and i select suboccurrence from list, this selected object is not occurrence nor suboccurrence.

How to detect type of selected object, and how to select suboccurrence in SE assembly? How to select subassembly occurrence ?

Thanks.

Juraj JoobUser is Offline
Site Member
Site Member
Posts:25

01/12/2010 1:15 AM  
I have learned what object return QuickPick if i click on suboccurrence. It is Reference.
Juraj JoobUser is Offline
Site Member
Site Member
Posts:25

01/12/2010 1:15 AM  
I have learned what object return QuickPick if i click on suboccurrence. It is Reference.
JRUser is Offline
Site Member
Site Member
Posts:78

01/12/2010 1:24 AM  

Hi Juraj,

you can check the type of the seleced objects in the SelectSet (you can select the objects with SelectSet.Add too) . All the items are the objects. If you select an occurrence (first level of a Topassembly) is a occurrence as type. If you select a suboccurrence with a mouse is a reference as type, the reference.object.type gives you the type (occurrence object, not suboccurrence object). If you select the object "occurrence" in subassembly, than is this an object of the subassembly and "not" from the Topasssembly. You should select a reference or a suboccurrence, and an occurrence only in first level of Topassembly.

Regards
JR

Juraj JoobUser is Offline
Site Member
Site Member
Posts:25

01/12/2010 3:44 AM  
Hi JR,

when i select suboccurrence with mouse, selected object pGraphicDispatch is SolidEdgeFramework.Reference object type. How to get SolidEdgeAssembly.Suboccurrence object from Reference object, because property Reference.Object give SolidEdgeAssembly.Occurrence object, not SolidEdgeAssembly.Suboccurrence object ?

Thanks.
Juraj JoobUser is Offline
Site Member
Site Member
Posts:25

01/12/2010 3:44 AM  
Hi JR,

when i select suboccurrence with mouse, selected object pGraphicDispatch is SolidEdgeFramework.Reference object type. How to get SolidEdgeAssembly.Suboccurrence object from Reference object, because property Reference.Object give SolidEdgeAssembly.Occurrence object, not SolidEdgeAssembly.Suboccurrence object ?

Thanks.
JRUser is Offline
Site Member
Site Member
Posts:78

01/12/2010 4:38 AM  
Hi Juraj,

this is realy a Problem.
I go with loop from reference to top level and i save the names of the occurrences in an array. In next step i go from occurrence to suboccurrence with the name from the array as item. The names of occurrence and suboccurrence are the same.
I don't know a simpler way.
Juraj JoobUser is Offline
Site Member
Site Member
Posts:25

01/12/2010 5:16 AM  
Thanks JR, i try it.
harryUser is Offline
New Member
New Member
Posts:7

02/05/2010 7:27 AM  
I use this method in an assembly:
ASMobjDoc.SelectSet.Item(1).OccurrenceDocument

And this to know how much objects are selected:
ASMobjDoc.SelectSet.Count
You are not authorized to post a reply.
Forums > Solid Edge > Programming > How to detect selected object type ?



ActiveForums 3.7

  

 Users Online Minimize

Membership Membership:
Latest New User Latest: jbazaar
New Today New Today: 1
New Yesterday New Yesterday: 3
User Count Overall: 1968

People Online People Online:
Visitors Visitors: 1
Members Members: 0
Total Total: 1

Online Now Online Now:

  

The Code Project

Spatial Freedom Astroid

Use OpenDNS

Copyright 2010 JasonNewell.NET   Terms Of Use  Privacy Statement