TxObjectList parts = TxApplication.ActiveDocument.PhysicalRoot.GetAllDescendants(new TxTypeFilter(typeof(TxComponent)));
I tried this code to get all component. But it never shows component. The same code i tries with different filter like TxRobot, TxCompoundPart but it never works for loaded study. What shold be the reason?
Solved! Go to Solution.
It is process simulate standalone. and its not working for any of objet type. I have tried for TxRobot , TxCompoundPart, Txcomponent. I couldnt get any about this.
What data do you have loaded in 3D view? and in the Object Tree?
Also, does this work?
here i attached a picture, U can see there is avery normal data , which cell use. But your updated code also not working. In the picture , i have manually expand object tree , N I want to expand it by button1.
You might have some other bug in your code which prevents you from seeing the results, or you run with optimized code?
If you build your DLL in debug, and connect with a VS debugger, do you see that the returned TxObjectList is empty?
TxObjectList objList = TxApplication.ActiveDocument.PhysicalRoot.GetAllDescendants(new TxTypeFilter(typeof(ITxObject)));
When I run this I get a full list. See attached image.
Hello, I m little bit new in VS. Can u explain me with steps , how did you get this list in VS ?
I have applied same method as u applied. Just want to know in VS how did you get Lisr?
May be that will be helpful for me to solve original problem.
To debug your code using VS, first start Process Simulate (not from VS).
Then you need to attach VS to a process named "Tune.exe".
Do that by:
1. clicking on "Debug" --> Attach to Process...
2. In the dialog that opens, choose "Tune.exe" process.
3. Make sure you select "Managed (v4.5, v4.0) code" code type (using "Select..." button if needed)
4. Click on Attach.
5. Set a breakpoint in code by putting the marker on the line you wish to debug and clicking 'F9' - you will see a red dot next to it.
6. Run your command/dialog.
See this for more tips about debugging: