×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

UF_LAYER_ask_work_layer

UF_LAYER_ask_work_layer

UF_LAYER_ask_work_layer

(OP)
What is the equivalent vb.net function to get the current working layer?

RE: UF_LAYER_ask_work_layer

(OP)
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)

RE: UF_LAYER_ask_work_layer

Perhaps:
{reference to part}.Views.WorkView.AskVisibleObjects()

www.nxjournaling.com

RE: UF_LAYER_ask_work_layer

(OP)
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.

RE: UF_LAYER_ask_work_layer

Well, that makes sense...

CODE

{reference to part}.Views.WorkView.Fit()
{reference to part}.Views.WorkView.AskVisibleObjects() 

www.nxjournaling.com

RE: UF_LAYER_ask_work_layer

(OP)
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.

RE: UF_LAYER_ask_work_layer

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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources