Reset to nominals

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

  • Reset to nominals

    Here's one...

    I got it from WILCOX
    Last edited by JamesMannes; 08-03-2007, 08:27 AM.
    sigpic

    James Mannes

  • #2
    Can't you get the same effect by marking all, then having it show the path lines and saving? OR, do you mean something other than resetting all feature's actuals to the nominals (targets)?
    sigpic
    Originally posted by AndersI
    I've got one from September 2006 (bug ticket) which has finally been fixed in 2013.

    Comment


    • #3
      Chees pick pick pick. Never went that route. Should have said I got it from Wilcox too. OK?
      sigpic

      James Mannes

      Comment


      • #4
        Oh don't take your ball and go home. I was just ribbin ya.
        sigpic

        James Mannes

        Comment


        • #5
          Is that what it does? Really?

          V3.7 kind of developed a BUG using my method, you can show the path lines, save the program, close it, open it back up, and ALL the features will show that the actuals do match the nominals (target values) BUT NONE OF THE DIMENSIONS will update to show the new actuals! What you need to do at that point is re-enter the feature ID in the first dimension, then they will all update. Nice bug, eh?

          WARNING, the show path lines method will make Pcdmis set all the actuals to the TARGET values. In most cases, these will match the nominals, but not always. For an example, the only feature(s) I have ever changed the TARGET values for is a small hole (say, 3mm) that was more than 0.5mm off location and the 2mm ball wouldn't go into the hole, that kind of thing. I do not know what your BS, er I mean, B&S solution would do in that case.
          sigpic
          Originally posted by AndersI
          I've got one from September 2006 (bug ticket) which has finally been fixed in 2013.

          Comment


          • #6
            Have you ran that code James? Your variable declarations are commented.

            Craig


            See your application object declaration is commented (Dim App As PCDLRN.Application). Then you Set your reference (Set App). Does this instantiate dynamically? I don't believe it does but I have been wrong before.

            Also I believe that PartProgram is a member of the PCDLRN.Application and should be instantiated as such. I am no expert at this so that is why I ask if this code runs.

            Perhaps this code:
            Code:
            '
            '  Dim App As PCDLRN.Application
            '  Dim Cmd As PCDLRN.Command
            '  Dim FCmd As PCDLRN.FeatCmd
            '  Dim Part As PCDLRN.PartProgram
            '  Dim Cmds As PCDLRN.Commands
            
            Dim Cmds As Object
            Dim FCmd As Object
            Dim Cmd As Object
            
              Set App = CreateObject("PCDLRN.Application")
              Set Part = App.ActivePartProgram
              Set Cmds = Part.Commands
            Should be:
            Code:
            '
            Dim App As Object
            Dim Part As Object
            Dim Cmds As Object
            Dim FCmd As Object
            Dim Cmd As Object
            
              Set App = CreateObject("PCDLRN.Application")
              Set Part = App.ActivePartProgram
              Set Cmds = Part.Commands
            Perhaps the code you posted is making an attempt at early binding and that is why it looks as such but I believe you may still need to uncomment the first lines.
            Last edited by craiger_ny; 10-04-2006, 02:33 PM.
            <internet bumper sticker goes here>

            Comment


            • #7
              Craiger, Yes it runs. But, I will again say that this is a WILCOX .bas I can't take credit for it. I can understand some VB stuff but the class I took was quite a while ago and most of my app's don't require mucking around with a lot of VB.
              sigpic

              James Mannes

              Comment


              • #8
                I guess I'm a little lost. Does the instance of the application object not need to be declared? It looks as if it does not. the line "Dim App As PCDLRN.Application" is commented, I understand that this would early bind the variable if it were not commented. Then the variable is set to point to PCDMIS with "Set App = CreateObject("PCDLRN.Application")". However, there is no object declared, so is the object declared dynamically as well as pointed to PCDMIS with this line? I see the same thing is being done with part programs and commands. Understanding that the code does run, is it safe to do this by convention? Is it being done this way because the calling application is the same application being automated. Maybe I'll check a VB forum to see. Like I said I am not entirely on top of my game with this, just enough to be dangerous.

                Craig
                Last edited by craiger_ny; 10-05-2006, 07:00 AM.
                <internet bumper sticker goes here>

                Comment


                • #9
                  Click here for words on the architecture of this .bas
                  <internet bumper sticker goes here>

                  Comment


                  • #10
                    So how do you run the basic programs? I'm familiar with VBA in Word and Excel, and with VB in Visual Studio, but those apps are not on the CMM computer.

                    Thanks,
                    Keith

                    Comment


                    • #11
                      insert>basic script. Leave this in the program and at the end it will reset everything (make sure you put in a print command first), or insert this in the program and F9 it and hit the play button in the basic script edit window and it will run the script.
                      sigpic

                      James Mannes

                      Comment


                      • #12
                        Originally posted by JamesMannes
                        insert>basic script. Leave this in the program and at the end it will reset everything (make sure you put in a print command first), or insert this in the program and F9 it and hit the play button in the basic script edit window and it will run the script.
                        what does the print command do?

                        I created a variable called TimeToRun and set it by prompting the user. Then I insert a basic script which uses the getvariable to retrieve the value from the program. After calculations, I use setvariable to pass information from the basic program back to the part program. Unfortunately, these commands did not work. Will the print command do something magical?

                        Keith

                        Comment


                        • #13
                          Originally posted by keith
                          what does the print command do?

                          I created a variable called TimeToRun and set it by prompting the user. Then I insert a basic script which uses the getvariable to retrieve the value from the program. After calculations, I use setvariable to pass information from the basic program back to the part program. Unfortunately, these commands did not work. Will the print command do something magical?

                          Keith
                          Not every version supports setting a variable value through automation. I went from V 3.2063 to V 3.7. I do know it is not in the basic language library for 3.2063 but it is in 3.7, what version it became a feature in I do not know. Perhaps someone with 3.25 or 3.5 could check their help file and let us know if the SetVariableValue method is supported or not. Or you could download the basic language reference (PCDBasic) from Wilcox. That has been a helpful document for me.

                          Craig
                          <internet bumper sticker goes here>

                          Comment


                          • #14
                            Originally posted by craiger_ny
                            Not every version supports setting a variable value through automation. I went from V 3.2063 to V 3.7. I do know it is not in the basic language library for 3.2063 but it is in 3.7, what version it became a feature in I do not know. Perhaps someone with 3.25 or 3.5 could check their help file and let us know if the SetVariableValue method is supported or not. Or you could download the basic language reference (PCDBasic) from Wilcox. That has been a helpful document for me.

                            Craig

                            I'm running 3.7 mr2 (soon to be 4.1)

                            Comment


                            • #15
                              can you post your script and PCDMIS code. SetVariableValue should work in 3.7. It must be something else. I'm not sure what the print is for. I don't have any print commands going on.

                              Craig
                              <internet bumper sticker goes here>

                              Comment

                              Related Topics

                              Collapse

                              Working...
                              X