Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Automatic Boundary too large

Status
Not open for further replies.

MyKL.S

Civil/Environmental
Nov 6, 2018
21
Just trying to figure out why the automatic boundary in my drawings are too large. It has something to do with the model itself cause when I press "fit" in model space it zooms out a bit far as well.

It doesn't really matter in model space but in Drafting when I have multiple views it's starting to be lil bit confising with boudaries rectangles crossing each other. One solution is to set manual boudary to every view but it's not really convenient either.

If someone countered this issue and has some solution I would appreciate some tips.

Thanks

Best Regards
MyKL
NX 9.0 / Win10
 
 https://files.engineering.com/getfile.aspx?folder=8355794f-5aee-4944-b120-b28b4381d6ea&file=Drafting.png
Replies continue below

Recommended for you

The fit size / area you can set in the Visualization Preferences. Also the behavior of the fit action can be set.
FitPref_hculpu.png


Not sure how much this will affect the view borders.. As far as I can see in the different preferences (mainly Drafting preferences), there is no separate setting for this.

Ronald van den Broek
Senior Application Engineer
Winterthur Gas & Diesel Ltd
NX9 / TC10.1.2

Building new PLM environment from Scratch using NX12 / TC11
 
Thanks for the tip, however this seems not to be the problem. I already had it cranked up the percentage to 100.

But, I found only some components of my assembly are causing the issue, when I hide them and do the fit again, everything seems fine. Same goes for drafting as long as they are visible in the view.

The behaviour is the same in the component itself. It looks like there is some invisible "entity" to which NX is trying to fit the view, but I cant see anything.

All parts displayed:
with_ylw6e6.png


Some parts hidden:
without_gtx8jj.png


Best Regards
MyKL
NX 9.0 / Win10
 
I've had this happen. In my case, it was very tiny geometry (near zero length line) that wasn't visible when the zoom level was set so that you could see the model. Try this: open the offending part, fit the view, hide the main body, then window select (or select all) around the entire graphics area and see if the selection picks up any objects.

www.nxjournaling.com
 
I remember (from the early days) that we had a similar issue. For us this mainly happened when we were importing dxf files.
We had "Ghost" elements on layers. The object count on a layer was showing objects, but on the screen there was nothing to see. Not even when every thing was un-blanked / shown.
There is a journal availabe from Gtac to delete everything on a layer. With that we were able to remove those ghost elements (if you can't see them, you can't select them either).
Of course you have to move everything you want to keep to another layer first.

The VB below will first give you a report of everything found on the layer you want to be cleaned.

Code:
Option Strict Off

Imports System
Imports NXOpen
Imports NXOpen.UF
Imports NXOpenUI

Module delete_all_objects_on_specified_layer

    Public theSession As Session = Session.GetSession()
    Public theUFSession As UFSession = UFSession.GetUFSession()

    Sub Main()

        Dim layerNum As Integer = 0
        Dim userInputNumber As Double

        userInputNumber = NXInputBox.GetInputNumber("Layer to wipe clean:")
        layerNum = userInputNumber

        If layerNum < 1 Or layerNum > 256 Then
            MsgBox("That is not a valid layer.", MsgBoxStyle.Information)
            Return
        End If

        Dim dispPart As Part = theSession.Parts.Display

        Dim objs() As NXObject = dispPart.Layers.GetAllObjectsOnLayer(layerNum)

        Dim toDelete As System.Collections.ArrayList = New System.Collections.ArrayList

        For Each obj As NXObject In objs

            Dim theType As Integer
            Dim theSubtype As Integer

            theUFSession.Obj.AskTypeAndSubtype(obj.Tag, theType, theSubtype)
            If (Not theType = UFConstants.UF_parametric_text_type) And
               ((Not theType = UFConstants.UF_tabular_note_type) Or _
               (theSubtype = UFConstants.UF_tabular_note_section_subtype)) Then
                toDelete.Add(obj)
            End If

        Next

        theSession.Information.DisplayObjectsDetails(toDelete.ToArray(GetType(NXObject)))

        If AskYesOrNo("Check Information Listing", "Delete all of these objects?") Then
            Dim undoMark As Session.UndoMarkId =
                theSession.SetUndoMark(Session.MarkVisibility.Visible,
                                       "Delete objects on layer " & layerNum)
            theSession.UpdateManager.AddToDeleteList(toDelete.ToArray(GetType(NXObject)))
            theSession.UpdateManager.DoUpdate(undoMark)
        End If

    End Sub

    Function AskYesOrNo(ByVal title As String, ByVal message As String) As Boolean
        Dim messages As String() = {message}
        Dim buttons As UFUi.MessageButtons
        With buttons
            .button1 = True
            .button2 = False
            .button3 = True
            .label1 = "Yes"
            .label2 = Nothing
            .label3 = "No"
            .response1 = 1
            .response2 = 0
            .response3 = 2
        End With
        Dim resp As Integer

        theUFSession.Ui.LockUgAccess(UFConstants.UF_UI_FROM_CUSTOM)
        theUFSession.Ui.MessageDialog(title, UiMessageDialogType.UiMessageQuestion, messages, 1, True, buttons, resp)
        theUFSession.Ui.UnlockUgAccess(UFConstants.UF_UI_FROM_CUSTOM)

        If resp = 1 Then Return True Else Return False
    End Function

    Public Function GetUnloadOption(ByVal dummy As String) As Integer
        Return Session.LibraryUnloadOption.Immediately
    End Function

End Module

Ronald van den Broek
Senior Application Engineer
Winterthur Gas & Diesel Ltd
NX9 / TC10.1.2

Building new PLM environment from Scratch using NX12 / TC11
 
Thank you guys for your help. Unfortunatelly neither of the methods did work. There is just single solid that is causing the problem and object count shows 1 as well.
Anyway thanks for the code, might be useful in the future.

Best Regards
MyKL
NX 9.0 / Win10
 
Try doing a part clean-up on the component that is giving you problems.
File -> Utilities -> Part Clean-Up

Jerry J.
UGV5-NX1884
 
In addition to the part cleanup, I'd suggest checking the geometry (examine geometry command). If there are geometry errors, NX may be calculating the bounding boxes incorrectly.

www.nxjournaling.com
 
I've had similar issues in the past,almost always caused by a rogue datum. I set fit to "Exclude Datums" and haven't had any problems lately when zooming, don't know if that is related to boundary issues in drafting.

Edit: I just checked and it doesn't help with drafting bounding boxes. Still, it can help determine if a datum is causing the issue by trying it in modeling.

exclude_datums_f6brr9.jpg
 
Part cleanup was one of the first things I've tried. Examine geometry shows all passed.
@mmauldin as there is just one solid body on the layer (as object counter confirmed), there are no datums to exclude, so that does not help either.

Best Regards
MyKL
NX 9.0 / Win10
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor