Quantcast
Channel: NX Journaling - Journaling / NXOpen API
Viewing all articles
Browse latest Browse all 787

Extract positions of pattern feature

$
0
0

Hello,

I need to extract all positions in the pattern general of a linked body.
The following code not working, the section1 have not information of linked body's.
have you an idea of the good way :).
Sorry for my bad english

Option Strict Off
Imports System
Imports NXOpen
Imports NXOpen.Features

Module Module1

Sub Main()

Dim theSession As Session = Session.GetSession()
Dim workPart As Part = theSession.Parts.Work
Dim lw As ListingWindow = theSession.ListingWindow
lw.Open()

Dim featArray() As Feature = workPart.Features.GetFeatures()

For Each myFeature As Feature In featArray
lw.WriteLine("Feature: "& myFeature.FeatureType.ToString)
If myFeature.FeatureType = "Pattern Feature" Then

Dim pattfeaturebuilder As PatternFeatureBuilder = workPart.Features.CreatePatternFeatureBuilder(myFeature)
Dim section1 As NXOpen.Section
section1 = pattfeaturebuilder.PatternService.GeneralDefinition.ToPoints


Viewing all articles
Browse latest Browse all 787

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>