journal wavelink body
journal wavelink body
(OP)
thread561-197154: Journal (.NET) Wavelink objects
from the thread above, how would I adjust the code to create a wavelink that is associative, and selects all bodies on the screen to wavelink over?
from the thread above, how would I adjust the code to create a wavelink that is associative, and selects all bodies on the screen to wavelink over?





RE: journal wavelink body
www.nxjournaling.com
RE: journal wavelink body
RE: journal wavelink body
In any case, I'd recommend recording a journal while creating the linked bodies you want. When you get a journal that does what you want when you replay it, we can edit it to generalize it and trim out the unnecessary stuff the recorder throws in.
www.nxjournaling.com
RE: journal wavelink body
I have code to link over components. I select a component as a workpart, and run the journal. It gives me a selection scope, I choose another part and it creates and unassociated wavelink. I would to make this wavelink associative because that is how I need to run it in order for everything to work.
This is the code that recorded when I ran the wavelink command but I cannot get it to replicate the command through journal.
CODE --> vb
' ---------------------------------------------- ' Menu: Insert->Associative Copy->WAVE Geometry Linker... ' ---------------------------------------------- Dim markId1 As Session.UndoMarkId markId1 = theSession.SetUndoMark(Session.MarkVisibility.Visible, "Start") Dim nullFeatures_Feature As Features.Feature = Nothing If Not workPart.Preferences.Modeling.GetHistoryMode Then Throw(New Exception("Create or edit of a Feature was recorded in History Mode but playback is in History-Free Mode.")) End If Dim waveLinkBuilder1 As Features.WaveLinkBuilder waveLinkBuilder1 = workPart.BaseFeatures.CreateWaveLinkBuilder(nullFeatures_Feature) Dim waveDatumBuilder1 As Features.WaveDatumBuilder waveDatumBuilder1 = waveLinkBuilder1.WaveDatumBuilder Dim compositeCurveBuilder1 As Features.CompositeCurveBuilder compositeCurveBuilder1 = waveLinkBuilder1.CompositeCurveBuilder Dim waveSketchBuilder1 As Features.WaveSketchBuilder waveSketchBuilder1 = waveLinkBuilder1.WaveSketchBuilder Dim waveRoutingBuilder1 As Features.WaveRoutingBuilder waveRoutingBuilder1 = waveLinkBuilder1.WaveRoutingBuilder Dim wavePointBuilder1 As Features.WavePointBuilder wavePointBuilder1 = waveLinkBuilder1.WavePointBuilder Dim extractFaceBuilder1 As Features.ExtractFaceBuilder extractFaceBuilder1 = waveLinkBuilder1.ExtractFaceBuilder Dim mirrorBodyBuilder1 As Features.MirrorBodyBuilder mirrorBodyBuilder1 = waveLinkBuilder1.MirrorBodyBuilder extractFaceBuilder1.FaceOption = Features.ExtractFaceBuilder.FaceOptionType.FaceChain waveLinkBuilder1.Type = Features.WaveLinkBuilder.Types.BodyLink compositeCurveBuilder1.AllowSelfIntersection = True extractFaceBuilder1.FaceOption = Features.ExtractFaceBuilder.FaceOptionType.FaceChain extractFaceBuilder1.TraverseInteriorEdges = True extractFaceBuilder1.AngleTolerance = 45.0 waveDatumBuilder1.DisplayScale = 2.0 compositeCurveBuilder1.AllowSelfIntersection = True extractFaceBuilder1.ParentPart = Features.ExtractFaceBuilder.ParentPartType.OtherPart theSession.SetUndoMarkName(markId1, "WAVE Geometry Linker Dialog") extractFaceBuilder1.Associative = True extractFaceBuilder1.FixAtCurrentTimestamp = False extractFaceBuilder1.HideOriginal = False extractFaceBuilder1.InheritDisplayProperties = False Dim selectObjectList1 As SelectObjectList selectObjectList1 = extractFaceBuilder1.BodyToExtract ' ---------------------------------------------- ' Menu: Edit->Selection->Select All ' ---------------------------------------------- ' Refer to the sample NXOpen application, Selection for "Select All" alternatives. Dim objects1(0) As TaggedObject Dim component1 As Assemblies.Component = CType(displayPart.ComponentAssembly.RootComponent.FindObject("COMPONENT_REV_PLATE"), Assemblies.Component) Dim body1 As Body = CType(component1.FindObject("PROTO#.Bodies|BLOCK(3)"), Body) objects1(0) = body1 Dim added1 As Boolean added1 = selectObjectList1.Add(objects1) Dim markId2 As Session.UndoMarkId markId2 = theSession.SetUndoMark(Session.MarkVisibility.Invisible, "WAVE Geometry Linker") Dim nXObject1 As NXObject nXObject1 = waveLinkBuilder1.Commit() theSession.DeleteUndoMark(markId2, Nothing) theSession.SetUndoMarkName(markId1, "WAVE Geometry Linker") waveLinkBuilder1.Destroy() ' ---------------------------------------------- ' Menu: Tools->Journal->Stop Recording ' ----------------------------------------------RE: journal wavelink body
RE: journal wavelink body
CODE
www.nxjournaling.com