Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Code returns attribute for wrong part

Status
Not open for further replies.

Kenja824

Automotive
Nov 5, 2014
949
I have some code that allows me to select an attribute and a box will pop up showing me certain attributes. Then I can change those attributes to what I wish and hit OK and it will add those attributes to the selected component.

However, this code was originally for a workpart and not for a selected component. When the list pops up with the specific attributes, it is showing me the attributes for the work part and not the component I had selected.

I believe the problem is in this function...

Can someone tell me what needs to change to read the selected component? Or if this code wouldnt change anything, let me know that?


Code:
 Private Function readAttribute(ByVal selPart As Part, ByVal attrName As String) As String

        Dim attrValue As String = Nothing
        Dim iRes As Integer
        Dim attrInfor As NXOpen.NXObject.AttributeInformation = Nothing
        Dim attrtype As NXOpen.NXObject.AttributeType = NXObject.AttributeType.String

        theUFSession.Attr.FindAttribute(selPart.Tag, 5, attrName, iRes)
        If iRes <> 0 Then
            attrInfor = selPart.GetUserAttribute(attrName, attrtype, 2)
            attrValue = attrInfor.StringValue
        Else
            attrValue = "---"
        End If

        Return attrValue

    End Function
 
Replies continue below

Recommended for you

This function takes 2 parameters (pieces of information that you give to the function): a part, and an attribute title. The function finds the attribute info from the given part. I don't think there is an issue with this function, but rather the code that calls this function is passing in the work part rather than the one you are interested in.

www.nxjournaling.com
 
I dont know what I was thinking. Its stupid not to just give the full code for others to use as well as make it easier to find the problem. lol

NOTE: The DLX file that works with it is attached as a file!


Code:
'==============================================================================
'  WARNING!!  This file is overwritten by the Block UI Styler while generating
'  the automation code. Any modifications to this file will be lost after
'  generating the code again.
'
'       Filename:  check_Attributes.vb
'
'        This file was generated by the NX Block UI Styler
'        Original File Created by: vegetagaru
'              Version: NX 9
'              Date: 
'              Time: 
'        NOTE: This file has been altered from the original to include component selection!
'==============================================================================

'==============================================================================
'  Purpose:  This TEMPLATE file contains VB.NET source to guide you in the
'  construction of your Block application dialog. The generation of your
'  dialog file (.dlx extension) is the first step towards dialog construction
'  within NX.  You must now create a NX Open application that
'  utilizes this file (.dlx).
'
'  The information in this file provides you with the following:
'
'  1.  Help on how to load and display your Block UI Styler dialog in NX
'      using APIs provided in NXOpen.BlockStyler namespace
'  2.  The empty callback methods (stubs) associated with your dialog items
'      have also been placed in this file. These empty methods have been
'      created simply to start you along with your coding requirements.
'      The method name, argument list and possible return values have already
'      been provided for you.
'==============================================================================

'------------------------------------------------------------------------------
'These imports are needed for the following template code
'------------------------------------------------------------------------------
Option Strict Off
Imports System
Imports NXOpen
Imports NXOpen.UF
Imports NXOpen.BlockStyler
Imports System.Globalization

'------------------------------------------------------------------------------
'Represents Block Styler application class
'------------------------------------------------------------------------------
Public Class check_Attributes
    'class members
    Private Shared theSession As Session = Session.GetSession()
    Private Shared theUFSession As UFSession = UFSession.GetUFSession()
    Private Shared theUFSSession As UFSession = UFSession.GetUFSession()
    Private Shared theUI As UI = UI.GetUI()
    Private theDlxFileName As String
    Private theDialog As NXOpen.BlockStyler.BlockDialog
    Private groupAttr As NXOpen.BlockStyler.Group ' Block type: Group
    Private SPOT_ID As NXOpen.BlockStyler.StringBlock ' Block type: String
    Private ZONE_STA_ROBOT As NXOpen.BlockStyler.StringBlock ' Block type: String
    Private BLANK4 As NXOpen.BlockStyler.StringBlock ' Block type: String
    Private BLANK3 As NXOpen.BlockStyler.StringBlock ' Block type: String
    Private BLANK2 As NXOpen.BlockStyler.StringBlock ' Block type: String
    Private BLANK1 As NXOpen.BlockStyler.StringBlock ' Block type: String

    Private workPart As Part = theSession.Parts.Work
    Private displayPart As Part = theSession.Parts.Display
    Private lw As ListingWindow = theSession.ListingWindow

    '  Private bodyPart As Part = theSession.Parts.Display
    '  Private theComponent As Part = theSession.Parts.Display

    Dim theComponent As Assemblies.Component = Nothing

#Region "Block Styler Dialog Designer generator code"
    '------------------------------------------------------------------------------
    'Constructor for NX Styler class
    '------------------------------------------------------------------------------
    Public Sub New()

        '**************************************************************************************
        '********************************This code added to original*********************************************
        lw.Open()

        '      Dim theComponent As Assemblies.Component = Nothing

        If SelectComponent("select a component", theComponent) = Selection.Response.Cancel Then
            Return
        End If

        '   lw.WriteLine("component display name: " & theComponent.DisplayName)
        '   lw.WriteLine("component part path: " & theComponent.Prototype.OwningPart.FullPath)

        '    Const testAttribute As String = "thickness"

        'Dim thicknessAtt As NXObject.AttributeInformation = Nothing
        'If theComponent.HasUserAttribute(testAttribute, NXObject.AttributeType.Any, -1) Then
        '    thicknessAtt = theComponent.GetUserAttribute(testAttribute, NXObject.AttributeType.Any, -1)
        '    lw.WriteLine("""" & testAttribute & """" & " attribute found")

        '    lw.WriteLine("  attribute value: " & thicknessAtt.StringValue)
        'Else
        '    lw.WriteLine("component does NOT have an attribute named: " & testAttribute)
        'End If

        '      lw.Close()
        '**************************************************************************************
        '**************************************************************************************

        Try
            theDlxFileName = "R:\hms_tools\NX11\Tooling\Journals\TAG-attributes\check-Attributes.dlx"
            theDialog = theUI.CreateDialog(theDlxFileName)
            theDialog.AddApplyHandler(AddressOf apply_cb)
            theDialog.AddOkHandler(AddressOf ok_cb)
            theDialog.AddUpdateHandler(AddressOf update_cb)
            theDialog.AddInitializeHandler(AddressOf initialize_cb)
            theDialog.AddDialogShownHandler(AddressOf dialogShown_cb)

        Catch ex As Exception

            '---- Enter your exception handling code here -----
            Throw ex
        End Try
    End Sub
#End Region

    '------------------------------- DIALOG LAUNCHING ---------------------------------
    '
    '    Before invoking this application one needs to open any part/empty part in NX
    '    because of the behavior of the blocks.
    '
    '    Make sure the dlx file is in one of the following locations:
    '        1.) From where NX session is launched
    '        2.) $UGII_USER_DIR/application
    '        3.) For released applications, using UGII_CUSTOM_DIRECTORY_FILE is highly
    '            recommended. This variable is set to a full directory path to a file 
    '            containing a list of root directories for all custom applications.
    '            e.g., UGII_CUSTOM_DIRECTORY_FILE=$UGII_ROOT_DIR\menus\custom_dirs.dat
    '
    '    You can create the dialog using one of the following way:
    '
    '    1. Journal Replay
    '
    '        1) Replay this file through Tool->Journal->Play Menu.
    '
    '    2. USER EXIT
    '
    '        1) Create the Shared Library -- Refer "Block UI Styler programmer's guide"
    '        2) Invoke the Shared Library through File->Execute->NX Open menu.
    '
    '------------------------------------------------------------------------------

    Public Shared Sub Main()


        Dim thecheckAttributes As check_Attributes = Nothing
        Try
            If check_for_missing_display_part() = 0 Then
                thecheckAttributes = New check_Attributes()
                ' The following method shows the dialog immediately
                thecheckAttributes.Show()
            End If

        Catch ex As Exception

            '---- Enter your exception handling code here -----
            theUI.NXMessageBox.Show("Check Attributes", NXMessageBox.DialogType.Error, ex.ToString)
        Finally
            If thecheckAttributes IsNot Nothing Then
                thecheckAttributes.Dispose()
                thecheckAttributes = Nothing
            End If
        End Try
    End Sub
    '**************************************************************************************
    '**************************************************************************************
    Function SelectComponent(ByVal prompt As String, ByRef selObj As TaggedObject) As Selection.Response

        Dim theUI As UI = UI.GetUI
        Dim title As String = "Select a component"
        Dim includeFeatures As Boolean = False
        Dim keepHighlighted As Boolean = False
        Dim selAction As Selection.SelectionAction = Selection.SelectionAction.ClearAndEnableSpecific
        Dim cursor As Point3d
        Dim scope As Selection.SelectionScope = Selection.SelectionScope.AnyInAssembly
        Dim selectionMask_array(0) As Selection.MaskTriple

        With selectionMask_array(0)
            .Type = UFConstants.UF_component_type
            .Subtype = UFConstants.UF_component_subtype
        End With

        Dim resp As Selection.Response = theUI.SelectionManager.SelectTaggedObject(prompt,
        title, scope, selAction,
        includeFeatures, keepHighlighted, selectionMask_array,
        selObj, cursor)
        If resp = Selection.Response.ObjectSelected OrElse resp = Selection.Response.ObjectSelectedByName Then
            Return Selection.Response.Ok
        Else
            Return Selection.Response.Cancel
        End If

    End Function

    '------------------------------------------------------------------------------
    ' This method specifies how a shared image is unloaded from memory
    ' within NX. This method gives you the capability to unload an
    ' internal NX Open application or user  exit from NX. Specify any
    ' one of the three constants as a return value to determine the type
    ' of unload to perform:
    '
    '
    '    Immediately : unload the library as soon as the automation program has completed
    '    Explicitly  : unload the library from the "Unload Shared Image" dialog
    '    AtTermination : unload the library when the NX session terminates
    '
    '
    ' NOTE:  A program which associates NX Open applications with the menubar
    ' MUST NOT use this option since it will UNLOAD your NX Open application image
    ' from the menubar.
    '------------------------------------------------------------------------------
    Public Shared Function GetUnloadOption(ByVal arg As String) As Integer
        'Return CType(Session.LibraryUnloadOption.Explicitly, Integer)
        Return CType(Session.LibraryUnloadOption.Immediately, Integer)
        ' Return CType(Session.LibraryUnloadOption.AtTermination, Integer)
    End Function
    '------------------------------------------------------------------------------
    ' Following method cleanup any housekeeping chores that may be needed.
    ' This method is automatically called by NX.
    '------------------------------------------------------------------------------
    Public Shared Sub UnloadLibrary(ByVal arg As String)
        Try

        Catch ex As Exception

            '---- Enter your exception handling code here -----
            theUI.NXMessageBox.Show("Check Attributes", NXMessageBox.DialogType.Error, ex.ToString)
        End Try
    End Sub

    '------------------------------------------------------------------------------
    'This method shows the dialog on the screen
    '------------------------------------------------------------------------------
    Public Sub Show()
        Try

            theDialog.Show()

        Catch ex As Exception

            '---- Enter your exception handling code here -----
            theUI.NXMessageBox.Show("Check Attributes", NXMessageBox.DialogType.Error, ex.ToString)
        End Try
    End Sub

    '------------------------------------------------------------------------------
    'Method Name: Dispose
    '------------------------------------------------------------------------------
    Public Sub Dispose()
        If theDialog IsNot Nothing Then
            theDialog.Dispose()
            theDialog = Nothing
            displayPart.Views.Refresh()
            theSession.Parts.SetWork(workPart)
        End If
    End Sub

    '------------------------------------------------------------------------------
    '---------------------Block UI Styler Callback Functions--------------------------
    '------------------------------------------------------------------------------

    '------------------------------------------------------------------------------
    'Callback Name: initialize_cb
    '------------------------------------------------------------------------------
    Public Sub initialize_cb()
        Try

            groupAttr = CType(theDialog.TopBlock.FindBlock("groupAttr"), NXOpen.BlockStyler.Group)
            SPOT_ID = CType(theDialog.TopBlock.FindBlock("SPOT_ID"), NXOpen.BlockStyler.StringBlock)
            ZONE_STA_ROBOT = CType(theDialog.TopBlock.FindBlock("ZONE_STA_ROBOT"), NXOpen.BlockStyler.StringBlock)
            BLANK4 = CType(theDialog.TopBlock.FindBlock("BLANK4"), NXOpen.BlockStyler.StringBlock)
            BLANK3 = CType(theDialog.TopBlock.FindBlock("BLANK3"), NXOpen.BlockStyler.StringBlock)
            BLANK2 = CType(theDialog.TopBlock.FindBlock("BLANK2"), NXOpen.BlockStyler.StringBlock)
            BLANK1 = CType(theDialog.TopBlock.FindBlock("BLANK1"), NXOpen.BlockStyler.StringBlock)

            theSession.Parts.SetWork(displayPart)
            displayPart.Views.Refresh()

        Catch ex As Exception

            '---- Enter your exception handling code here -----
            theUI.NXMessageBox.Show("Check Attributes", NXMessageBox.DialogType.Error, ex.ToString)
        End Try
    End Sub

    '------------------------------------------------------------------------------
    'Callback Name: dialogShown_cb
    'This callback is executed just before the dialog launch. Thus any value set 
    'here will take precedence and dialog will be launched showing that value. 
    '------------------------------------------------------------------------------
    Public Sub dialogShown_cb()
        Try

            '---- Enter your callback code here -----

            SPOT_ID.Value = readAttribute(workPart, "SPOT_ID")
            If SPOT_ID.Value = "" Then SPOT_ID.Value = "---"

            ZONE_STA_ROBOT.Value = readAttribute(workPart, "ZONE_STA_ROBOT")
            If ZONE_STA_ROBOT.Value = "" Then ZONE_STA_ROBOT.Value = "---"

            BLANK4.Value = readAttribute(workPart, "BLANK4")
            If BLANK4.Value = "" Then BLANK4.Value = "---"

            BLANK3.Value = readAttribute(workPart, "BLANK3")
            If BLANK3.Value = "" Then BLANK3.Value = "---"

            BLANK2.Value = readAttribute(workPart, "BLANK2")
            If BLANK2.Value = "" Then BLANK2.Value = "---"

            BLANK1.Value = readAttribute(workPart, "BLANK1")
            If BLANK1.Value = "" Then BLANK1.Value = "---"

        Catch ex As Exception

            '---- Enter your exception handling code here -----
            theUI.NXMessageBox.Show("Check Attributes", NXMessageBox.DialogType.Error, ex.ToString)
        End Try
    End Sub

    '------------------------------------------------------------------------------
    'Callback Name: apply_cb
    '------------------------------------------------------------------------------
    Public Function apply_cb() As Integer
        Dim errorCode As Integer = 0
        Try

            '---- Enter your callback code here -----

            If SPOT_ID.Value.ToUpper = "---" Then SPOT_ID.Value = ""
            If ZONE_STA_ROBOT.Value.ToUpper = "---" Then ZONE_STA_ROBOT.Value = ""
            If BLANK4.Value.ToUpper = "---" Then BLANK4.Value = ""
            If BLANK3.Value.ToUpper = "---" Then BLANK3.Value = ""
            If BLANK2.Value.ToUpper = "---" Then BLANK2.Value = ""
            If BLANK1.Value.ToUpper = "---" Then BLANK1.Value = ""

            Dim theObjects(0) As NXObject
            theObjects(0) = theComponent
            createAttribute(workPart, theObjects, "SPOT_ID", SPOT_ID.Value)
            createAttribute(workPart, theObjects, "ZONE_STA_ROBOT", ZONE_STA_ROBOT.Value)
            createAttribute(workPart, theObjects, "BLANK4", BLANK4.Value)
            createAttribute(workPart, theObjects, "BLANK3", BLANK3.Value)
            createAttribute(workPart, theObjects, "BLANK2", BLANK2.Value)
            createAttribute(workPart, theObjects, "BLANK1", BLANK1.Value)



        Catch ex As Exception

            '---- Enter your exception handling code here -----
            errorCode = 1
            theUI.NXMessageBox.Show("Check Attributes", NXMessageBox.DialogType.Error, ex.ToString)
        End Try
        apply_cb = errorCode
    End Function

    '------------------------------------------------------------------------------
    'Callback Name: update_cb
    '------------------------------------------------------------------------------
    Public Function update_cb(ByVal block As NXOpen.BlockStyler.UIBlock) As Integer
        Try

            If block Is SPOT_ID Then
                '---- Enter your code here -----

            ElseIf block Is ZONE_STA_ROBOT Then


            ElseIf block Is BLANK4 Then
                '---- Enter your code here -----

            ElseIf block Is BLANK3 Then
                '---- Enter your code here -----

            ElseIf block Is BLANK2 Then
                '---- Enter your code here -----

            ElseIf block Is BLANK1 Then
                '---- Enter your code here -----

            End If
        Catch ex As Exception

            '---- Enter your exception handling code here -----
            theUI.NXMessageBox.Show("Check Attributes", NXMessageBox.DialogType.Error, ex.ToString)
        End Try
        update_cb = 0
    End Function

    '------------------------------------------------------------------------------
    'Callback Name: ok_cb
    '------------------------------------------------------------------------------
    Public Function ok_cb() As Integer
        Dim errorCode As Integer = 0
        Try

            '---- Enter your callback code here -----
            errorCode = apply_cb()

        Catch ex As Exception

            '---- Enter your exception handling code here -----
            errorCode = 1
            theUI.NXMessageBox.Show("Check Attributes", NXMessageBox.DialogType.Error, ex.ToString)
        End Try
        ok_cb = errorCode
    End Function

    '------------------------------------------------------------------------------
    'Function Name: GetBlockProperties
    'Returns the propertylist of the specified BlockID
    '------------------------------------------------------------------------------
    Public Function GetBlockProperties(ByVal blockID As String) As PropertyList
        GetBlockProperties = Nothing
        Try

            GetBlockProperties = theDialog.GetBlockProperties(blockID)

        Catch ex As Exception

            '---- Enter your exception handling code here -----
            theUI.NXMessageBox.Show("Check Attributes", NXMessageBox.DialogType.Error, ex.ToString)
        End Try
    End Function
    Public Shared Function check_for_missing_display_part() As Integer

        Dim dispPart As Part = Nothing

        dispPart = Session.GetSession().Parts.Display

        If dispPart Is Nothing Then
            Dim style As MsgBoxStyle
            Dim title As String = "Check for Displayed part"
            style = MsgBoxStyle.Information
            MsgBox("There is no displayed part   ", style, title)

            Return 1
        Else
            Return 0
        End If

    End Function
    Private Function readAttribute(ByVal selPart As Part, ByVal attrName As String) As String

        Dim attrValue As String = Nothing
        Dim iRes As Integer
        Dim attrInfor As NXOpen.NXObject.AttributeInformation = Nothing
        Dim attrtype As NXOpen.NXObject.AttributeType = NXObject.AttributeType.String

        theUFSession.Attr.FindAttribute(selPart.Tag, 5, attrName, iRes)
        If iRes <> 0 Then
            attrInfor = selPart.GetUserAttribute(attrName, attrtype, 2)
            attrValue = attrInfor.StringValue
        Else
            attrValue = "---"
        End If

        Return attrValue

    End Function
    '------------------------------------------------------------------------------
    'User Functions
    '------------------------------------------------------------------------------
    Private Sub createAttribute(ByVal thisPart As Part, ByVal theObjects() As NXObject, ByVal attrTitle As String, ByVal attrValue As String, Optional attrCategory As String = "")

        Dim attributePropertiesBuilder1 As AttributePropertiesBuilder = theSession.AttributeManager.CreateAttributePropertiesBuilder(thisPart, theObjects, AttributePropertiesBuilder.OperationType.Create)

        attributePropertiesBuilder1.IsArray = False
        attributePropertiesBuilder1.Category = attrCategory
        attributePropertiesBuilder1.Title = attrTitle
        attributePropertiesBuilder1.StringValue = attrValue
        attributePropertiesBuilder1.Commit()
        attributePropertiesBuilder1.Destroy()

    End Sub

End Class
 
 https://files.engineering.com/getfile.aspx?folder=75d4d99f-7eb4-4625-9595-91f4e042c887&file=check-Attributes.dlx
Thanks cowski

This is the code that is the problem then I believe.... As it actually calls for workpart. lol

What would I add in its place?

Code:
 '------------------------------------------------------------------------------
    'Callback Name: dialogShown_cb
    'This callback is executed just before the dialog launch. Thus any value set 
    'here will take precedence and dialog will be launched showing that value. 
    '------------------------------------------------------------------------------
    Public Sub dialogShown_cb()
        Try

            '---- Enter your callback code here -----

            SPOT_ID.Value = readAttribute(workPart, "SPOT_ID")
            If SPOT_ID.Value = "" Then SPOT_ID.Value = "---"

            ZONE_STA_ROBOT.Value = readAttribute(workPart, "ZONE_STA_ROBOT")
            If ZONE_STA_ROBOT.Value = "" Then ZONE_STA_ROBOT.Value = "---"

            BLANK4.Value = readAttribute(workPart, "BLANK4")
            If BLANK4.Value = "" Then BLANK4.Value = "---"

            BLANK3.Value = readAttribute(workPart, "BLANK3")
            If BLANK3.Value = "" Then BLANK3.Value = "---"

            BLANK2.Value = readAttribute(workPart, "BLANK2")
            If BLANK2.Value = "" Then BLANK2.Value = "---"

            BLANK1.Value = readAttribute(workPart, "BLANK1")
            If BLANK1.Value = "" Then BLANK1.Value = "---"

        Catch ex As Exception

            '---- Enter your exception handling code here -----
            theUI.NXMessageBox.Show("Check Attributes", NXMessageBox.DialogType.Error, ex.ToString)
        End Try
    End Sub
 
 https://files.engineering.com/getfile.aspx?folder=75d4d99f-7eb4-4625-9595-91f4e042c887&file=check-Attributes.dlx
You'll need to pass in the part you are interested in rather than the work part; or make the part you are interested in the work part (and update the workPart reference) before calling the function.

Edit: the function apply_cb calls the createAttribute subroutine and passes in the workPart variable. This code will also need to be updated according to your needs.

www.nxjournaling.com
 
It looks like you are selecting the component before the dialog loads? I don't have a blockstyler license, so I'm not sure of the order that things load, but you could try passing in "theComponent.Prototype.OwningPart" instead of "workPart" to the "readAttribute" function.

www.nxjournaling.com
 
When I look at the "ReadAttribute" function, I do not see anything to do with "Workpart". Forgive me if I am misunderstanding. I am worse than amateur at this. I am assuming you meant the "dialogShown_cb" Sub that looks to me like it calls the "ReadAttribute" function? I tried replacing "workpart" there. Just to test it, I only replaced it for the SPOT_ID value and when I ran it, it replaced that one with the "---" as if the value was empty.


Unfortunately I don't know anything about BlockStyler. I am guessing that is what creates the DLX file that works with this?


Kind of looking like I am gonna lose this battle right now. lol Which in the end, that is not super bad as it still gets the job done and writes the correct attributes and values to the components. They just cant see when they click on it if the component they select actually needs it.

However, I think I see a way around this. In the Public Sub New, where it asks to select a component. How would I change the following code to just list the attribute value for "SPOT_ID" Attribute?

lw.WriteLine("component display name: " & theComponent.DisplayName)

This way when they select the component, the window will pop up and they can see what attributes are on the component so they know if they need to even add the attributes. This would save them looking up the info and typing it out for each component. This would basically do the same thing but just use the Info Window instead of the dialogue box that pops up.
 
The "readAttribute" function itself is fine, leave it alone. The code that calls the function (as shown in your post dated 5 Feb 20 19:45) is passing in the work part to the readAttribute function - this is what you want to change. In the dialogShown_cb sub there are several calls to readAttribute, the first one looks like:

Code:
SPOT_ID.Value = readAttribute(workPart, "SPOT_ID")

As you can see, it passes in a variable named "workPart" (which references the part that was the work part at the start of the code execution). Try changing that line to:
Code:
SPOT_ID.Value = readAttribute(theComponent.Prototype.OwningPart, "SPOT_ID")

I think this will work for you, but it depends on the order that things get executed when the dlx file is loaded.

www.nxjournaling.com
 
Yeah that looks like what I tried...

SPOT_ID.Value = readAttribute(theComponent.Prototype.OwningPart, "SPOT_ID")
If SPOT_ID.Value = "" Then SPOT_ID.Value = "---"

It is returning the "---" instead of the value for the SPOT_ID". As if the attribute is empty.
 
Note that the components will need to be fully loaded for this to work; if you are using a partial or lightweight loading option, this won't work.

If fully loading the components still doesn't work, double check that the component part file actually has an attribute with the name exactly as called for in the code (and that it has a value).

www.nxjournaling.com
 
Yup, loaded fully and certain the parts have the attributes. I am using this program to add the attributes and giving them specific values that I will recognize. When I go to their properties, the attributes are there and with the correct values. But when I run the code, it shows me just a "---" in the dialogue box.

If I can add the List Window to show the attributes, that would confirm beyond any down they are there as well as work as a work around so they will be able to see if they need to add the attributes to a component or not. Then it really wouldnt be a big deal. Though I would still fool around with it and see if I can get lucky. lol I would rather not use the List Window if I dont need to but its better than nothing.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor