Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations JAE on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

UF_LAYER_ask_work_layer

Status
Not open for further replies.

EngProgrammer

Aerospace
Joined
Jan 14, 2015
Messages
150
Location
US
What is the equivalent vb.net function to get the current working layer?
 
Hi Cowski,

Thank you. Still not there. I am now able to get all the objects on the working layer. But, there is still more geometry and objects than I need. Now, I want only the displayed objects on the screen and hence the current working layer.

Here's what I have so far.

Dim workLayer As Integer
workLayer = workpart.Layers.WorkLayer

Dim workLayerObjs() As NXObject
workLayerObjs = workpart.Layers.GetAllObjectsOnLayer(workLayer)
 
I've tried that too. workpart.Views.WorkView.AskVisibleObjects(). It is giving only the lines that are visible within the current screen display. If I zoom out I get more lines if I zoom in I get less lines.
 
Well, that makes sense...
Code:
{reference to part}.Views.WorkView.Fit()
{reference to part}.Views.WorkView.AskVisibleObjects()

www.nxjournaling.com
 
Yes. I was afraid of that. I have the user clicking on lines and arcs. Don't want the view window to zoom out and then zoom back in. This is more tricky than I had previously thought.....just the way coding goes sometimes.
 
Are you only looking for lines and arcs? If so, it would be fairly easy to iterate through them, checking on the layer and hidden status to see if they are visible to the user.

www.nxjournaling.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top