Help Fixing this Journal Please
Help Fixing this Journal Please
(OP)
I recorded a journal where I select points and move them to layer 230
I have been trying to merge it with another journal so that it will let the user select the points that will be moved. I know this is an easy enough task to do without a journal, but my goal is, once it is done, it will also filter so only points with the color 60, 66 & 75 can be selected. This is something I do quite often when on particular jobs and it grows tiring always having to set the filters. Over and over. So I figured I would create a journal that makes it all much easier.
However, the journal I have keeps erring out on the same line. (where the recorded journal selects points form a particular components. I need it to let me select from any component in the assembly. I have been trying to figure out how to rewrite this line but my knowledge is simply far too restricted.
The line in question (To my belief) is now bracketed by two long lines of dashes to help it stand out in the code.
If someone can please give me the fix, I would greatly appreciate it.
I have been trying to merge it with another journal so that it will let the user select the points that will be moved. I know this is an easy enough task to do without a journal, but my goal is, once it is done, it will also filter so only points with the color 60, 66 & 75 can be selected. This is something I do quite often when on particular jobs and it grows tiring always having to set the filters. Over and over. So I figured I would create a journal that makes it all much easier.
However, the journal I have keeps erring out on the same line. (where the recorded journal selects points form a particular components. I need it to let me select from any component in the assembly. I have been trying to figure out how to rewrite this line but my knowledge is simply far too restricted.
The line in question (To my belief) is now bracketed by two long lines of dashes to help it stand out in the code.
If someone can please give me the fix, I would greatly appreciate it.
CODE -->
Option Strict Off Imports System Imports NXOpen Imports NXOpen.UF Module Module1 Sub Main() Dim theSession As Session = Session.GetSession() Dim workPart As Part = theSession.Parts.Work Dim displayPart As NXOpen.Part = theSession.Parts.Display Dim thePoints() As NXObject If SelectPoints("Select points", thePoints) = Selection.Response.Cancel Then Return End If Dim objectArray1(0) As NXOpen.DisplayableObject ------------------------------------------- Dim point1 As NXOpen.Point = CType(component4.FindObject("PROTO#.Features|WELD_POINTMARK_ELEMENT(7)|POINT 1"), NXOpen.Point) ------------------------------------------- objectArray1(0) = point1 workPart.Layers.MoveDisplayableObjects(230, objectArray1) End Sub Function SelectPoints(ByVal prompt As String, byRef selObj() as NXObject) As Selection.Response Dim theUI As UI = UI.GetUI Dim title As String = "Select points" Dim includeFeatures As Boolean = False Dim keepHighlighted As Boolean = False Dim selAction As Selection.SelectionAction = Selection.SelectionAction.ClearAndEnableSpecific Dim scope As Selection.SelectionScope = Selection.SelectionScope.AnyInAssembly 'Dim scope As Selection.SelectionScope = Selection.SelectionScope.WorkPart Dim selectionMask_array(0) As Selection.MaskTriple With selectionMask_array(0) .Type = UFConstants.UF_point_type .Subtype = UFConstants.UF_point_subtype End With Dim resp As Selection.Response = theUI.SelectionManager.SelectObjects(prompt, _ title, scope, selAction, _ includeFeatures, keepHighlighted, selectionMask_array, _ selobj) If resp = Selection.Response.Ok Then Return Selection.Response.Ok Else Return Selection.Response.Cancel End If End Function Public Function GetUnloadOption(ByVal dummy As String) As Integer 'Unloads the image when the NX session terminates GetUnloadOption = NXOpen.Session.LibraryUnloadOption.AtTermination End Function End Module
Ken
www.OneGodLogic.com
My brain is like a sponge. A sopping wet sponge. When I use it, I seem to lose more than I soak in.
RE: Help Fixing this Journal Please
www.nxjournaling.com
RE: Help Fixing this Journal Please
I used to just have this button working with a macro, but when we upgraded, something went wrong I believe. Now when I record a macro with a user entry, it errors out on playback. I currently have a couple people in other companies who are going to record the same macro when they get the chance. I am hoping that the problem is in the recording and I can compare them to ours and see something I can change manually. IF not, then at least I will be able to tell IT that it records them right, but doesnt play them back right for some reason. But with this problem, I am forced to spend a lot of time that I dont have to figuring out how to make the same buttons with Journal. Which I am slowly, ever so slowly getting better at, but still really suck. lol
Ken
www.OneGodLogic.com
My brain is like a sponge. A sopping wet sponge. When I use it, I seem to lose more than I soak in.
RE: Help Fixing this Journal Please
www.nxjournaling.com
RE: Help Fixing this Journal Please
Ken
www.OneGodLogic.com
My brain is like a sponge. A sopping wet sponge. When I use it, I seem to lose more than I soak in.
RE: Help Fixing this Journal Please
I dont know if it will make any difference or not, but I just happened to notice in a macro I tried to record, that it listed us at NX1969. I just checked and that is the version we have. For some reason it lists the last version at the top of our sessions. lol
Ken
www.OneGodLogic.com
My brain is like a sponge. A sopping wet sponge. When I use it, I seem to lose more than I soak in.
RE: Help Fixing this Journal Please
www.nxjournaling.com
RE: Help Fixing this Journal Please
www.nxjournaling.com
RE: Help Fixing this Journal Please
My mind is a bit burnt out on this today, so tomorrow or Monday I will need to look closer at how this works compared to the other journals that allow user selection. This one looks different with the extra functions.
Thank you very much.
Ken
www.OneGodLogic.com
My brain is like a sponge. A sopping wet sponge. When I use it, I seem to lose more than I soak in.