Visual Basic Hexagon course help!!!

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Visual Basic Hexagon course help!!!

    I'm probably going to feel really stupid because there is probably a simple answer that I'm just not seeing. I'm doing the VB Net online course from Hexagon and I need to add an "Or" operator. The course doesn't tell me how to do it, Google has been no help and I can't find anything in Visual Basic. I'm needing to add the one in the teal box circled in red. Please help so I can quit banging my head on the desk.

    NinjaBadger I know you are good with this stuff...

    Help.JPG
    Last edited by A-machine-insp; 04-05-2021, 02:47 PM.
    Remembering my beautiful wife Taz who's life was lost on 6-13-2020. I love you and I miss you.

  • #2
    Double pipes, it will be the symbol above the backslash \ (Shift+ \ will insert a single pipe)
    ||
    (You need to press it twice)
    Systems Integrator
    Hexagon Manufacturing Intelligence

    Comment


    • #3
      Originally posted by Peter Fuller View Post
      Double pipes, it will be the symbol above the backslash \
      ||
      (You need to press it twice)
      Jesus, I knew I'd feel like an idiot. Thanks!
      Remembering my beautiful wife Taz who's life was lost on 6-13-2020. I love you and I miss you.

      Comment


      • KIRBSTER269
        KIRBSTER269 commented
        Editing a comment
        If it makes you feel any better, I always thought you were a dope.

      • A-machine-insp
        A-machine-insp commented
        Editing a comment
        KIRBSTER269 You are correct.

        Now I'm having issues getting DMIS to run the external program. I really feel like a dope today. I didn't have a great weekend and now it's bleeding into this week.
        Last edited by A-machine-insp; 04-05-2021, 04:16 PM.

    • #4
      Originally posted by A-machine-insp View Post

      Jesus, I knew I'd feel like an idiot. Thanks!
      I wouldn't feel stupid. The last time I used a pipe besides coding was in the late 80's when making ASCII art. Other than that, it's use is very obscure.
      Systems Integrator
      Hexagon Manufacturing Intelligence

      Comment


      • #5
        Originally posted by Peter Fuller View Post

        I wouldn't feel stupid. The last time I used a pipe besides coding was in the late 80's when making ASCII art. Other than that, it's use is very obscure.
        I knew it would be right in front of my face. I was born in the mid 80's so I never did ASCII art.
        Remembering my beautiful wife Taz who's life was lost on 6-13-2020. I love you and I miss you.

        Comment


        • #6
          Maybe ALT+186 ║ The ones I use alot is ALT+0177 ± or ALT+504 °

          Last edited by KIRBSTER269; 04-05-2021, 04:20 PM.
          (In Memory of my Loving wife, "Ronda" who I lost March 7, 2016. I love you baby.)
          They say "Nobody's Perfect." I must be Nobody.

          Comment


          • A-machine-insp
            A-machine-insp commented
            Editing a comment
            bfire85 I did too but I use them so much that they have been committed to memory.

          • Kp61dude!
            Kp61dude! commented
            Editing a comment
            don't forget Alt+0216 Ø

          • A-machine-insp
            A-machine-insp commented
            Editing a comment
            Kp61dude! That is what I meant but I typoed it. Just fixed the comment. Oops...

        • #7
          One (hopefully) last issue with the course. It's telling me to set a variable as File.ReadAllLines(partFilePath) but VB is telling me that File does not exist yet it's exactly how it is typed out in the exercise I am following. I have been over it several times and am not finding any spelling or capitalization errors. Any idea what's going on here?

          Help.JPG Help2.JPG Help3.JPG
          Remembering my beautiful wife Taz who's life was lost on 6-13-2020. I love you and I miss you.

          Comment


          • Peter Fuller
            Peter Fuller commented
            Editing a comment
            Not sure if it's the problem but "ReadAllLines" is case sensitive I think.

          • A-machine-insp
            A-machine-insp commented
            Editing a comment
            Peter Fuller Just fixed that but I'm still getting the same error.
            Last edited by A-machine-insp; 04-06-2021, 08:06 AM.

        • #8
          Interesting! Where can I find more information on this course?
          PC-DMIS CAD++ 2o19 R1 SP11

          Comment


          • #9
            Originally posted by vpt.se View Post
            Interesting! Where can I find more information on this course?
            https://learning.hexagonmi.com/catal...e.asp?id=42824
            Remembering my beautiful wife Taz who's life was lost on 6-13-2020. I love you and I miss you.

            Comment


            • #10
              If anyone knowledgeable with Visual Basic C# programming has some extra time, could you try this code out and see if you are getting the same error?

              I'm curious to see if others get the same error. If I am doing it right and there is an error, Hexagon needs to update the training.

              Code:
              using System;
              using System.Collections.Generic;
              using System.Linq;
              using System.Text;
              using System.Threading.Tasks;
              
              namespace ParemetricProgramLoader
              {
              class Program
              {
              static void Main()
              {
              Console.WriteLine("Enter part number:");
              var partName = Console.ReadLine();
              
              var partFilePath = [email protected]"C:\Users\insp\Desktop\CMM PROGRAMS\VB TEMP\{partName}.txt";
              
              var partParameters = File.ReadAllLines(partFilePath)
              .Select(p => p.Split(','))
              .ToDictionary(p => p[0], p => p[1]);
              
              var pcdmisType = Type.GetTypeFromProgID("PCDLRN.Application");
              var pcdmis = Activator.CreateInstance(pcdmisType) as PCDLRN.Application;
              var program = pcdmis.ActivePartProgram;
              var commands = program.Commands;
              for (int i = 1; i <= commands.Count; i++)
              {
              var command = commands.Item(i);
              if (command.IsFlowControl)
              {
              var assignmentCommand = command.FlowControlCommand;
              var assignmentName = assignmentCommand.GetLeftSideOfExpression();
              var parameterExists = partParameters.TryGetValue(assignmentName, out string assignmentValue);
              if (parameterExists)
              assignmentCommand.SetRightSideOfAssignment(assignm entValue);
              }
              }
              }
              }
              }
              Remembering my beautiful wife Taz who's life was lost on 6-13-2020. I love you and I miss you.

              Comment


              • A-machine-insp
                A-machine-insp commented
                Editing a comment
                vpt.se That seems to have fixed it!!! Now I can finish the exercise.

              • vpt.se
                vpt.se commented
                Editing a comment
                Great! Glad to have helped!

                If that is missing in the course material, please notify the headmaster...

              • A-machine-insp
                A-machine-insp commented
                Editing a comment
                vpt.se I put it in the comment section on the course review at the end. I also suggested a part 2 online course and an in person class.

            • #11
              SUCCESS!!! Thanks Peter Fuller and vpt.se. Now I get to play with it and ask more questions.
              Remembering my beautiful wife Taz who's life was lost on 6-13-2020. I love you and I miss you.

              Comment


              • #12
                I took this class a few years ago... don't remember seeing any C#. Are you writing in C# flavor on your own or does the class now offer some VB.NET and C#?
                PcDmis 2015.1 SP10 CAD++
                Global 7-10-7 DC800S

                Comment


                • #13
                  Originally posted by Kp61dude! View Post
                  I took this class a few years ago... don't remember seeing any C#. Are you writing in C# flavor on your own or does the class now offer some VB.NET and C#?
                  The course has you do it in C# now.

                  If I remember correctly, when the class was free during the virus BS, the class was called VB.NET for PC-DMIS. Now it is called Automating PC-DMIS so the course must have changed when the free classes ended.
                  Remembering my beautiful wife Taz who's life was lost on 6-13-2020. I love you and I miss you.

                  Comment


                  • #14
                    Originally posted by A-machine-insp View Post

                    The course has you do it in C# now.

                    If I remember correctly, when the class was free during the virus BS, the class was called VB.NET for PC-DMIS. Now it is called Automating PC-DMIS so the course must have changed when the free classes ended.
                    Interesting. I should ask to take the course again. It took me a while to convert all of my vb.net code into c# and have it all behave correctly

                    Comment


                    • #15
                      Originally posted by A-machine-insp View Post

                      The course has you do it in C# now.

                      If I remember correctly, when the class was free during the virus BS, the class was called VB.NET for PC-DMIS. Now it is called Automating PC-DMIS so the course must have changed when the free classes ended.
                      C# is the way to go anyway! Much more resources available on the interwebz.
                      PcDmis 2015.1 SP10 CAD++
                      Global 7-10-7 DC800S

                      Comment

                      Related Topics

                      Collapse

                      Working...
                      X