Twullf
Mechanical
- Jan 24, 2012
- 196
I am trying to get a line from a passed AssociativeLineBuilder from a Line created in another Sub Routine. The journal selects the line calling for the name, I am trying to avoid this since I plan on calling this multiple times. The previous subroutine only uses the builder class, so I do not yet have the feature identified as Line.
Recoded journal code:
Here is my code as it currently stands
The problem is in defining the line. I know there should be a way.
Error says: Value of type 'NXOpen.Features.AssociativeLine' cannot be converted to NXOpen.Line
I do not want the program selecting the component by the name, but rather passing the value of the currently created components.
Any help would be appreciated.
Recoded journal code:
Code:
Dim line2 As Line = CType(associativeLine1.FindObject("CURVE 1"), Line)
Here is my code as it currently stands
Code:
Dim feature1 As Features.Feature
feature1 = associativeLineBuilder1.commitFeature()
Dim associativeLine1 As Features.associativeLine = CType(feature1, Features.associativeLine)
Dim line2 As Line = CType( associativeLine1, Line )
The problem is in defining the line. I know there should be a way.
Error says: Value of type 'NXOpen.Features.AssociativeLine' cannot be converted to NXOpen.Line
I do not want the program selecting the component by the name, but rather passing the value of the currently created components.
Any help would be appreciated.