Settogglestring

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

  • Settogglestring

    Hello all,
    Is there some documentation on the settogglestring method.
    I am curious about the parameter values and how to set them
    accordingly.
    Thanks in advance for any help or info.

  • #2
    Besides the basic manual?

    Comment


    • #3
      1. Object Library reference materials: Went to Wilcox site, looked for reference manuals,
      http://www.wilcoxassoc.com/downloads...umentation.php
      Starting with version 4.0 (I think it was), they include a Basic programming reference with every supported version, which has an extensive Object Library reference

      I tried this link but it didn't work.
      I couldn't find anything in the Basic Language Help file when you hit F1.
      Found the SetToggleString method in the Object Library, but no explanation
      for the parameter values.

      Here is a snippet of code for the script
      I've been using to output diminfo for out
      of tolerance vector points.
      I only want the "T" value displayed.
      No headings, icons etc.

      delimpos = instr(1,CMDline,"OOT")

      If delimpos = 1 then

      Set Cmd = Cmds.Add(DIMENSION_INFORMATION, TRUE)

      Cmd.PutText Dimname, REF_ID, 0

      Cmd.SetToggleString 6, SHOW_IDS, 1

      Cmd.SetToggleString 6, SHOW_IDS, 2

      Cmd.SetToggleString 1, SHOW_HEADINGS, 0

      Cmd.SetToggleString 1, GRAPH_OPTION, 0

      Cmd.SetToggleString 4, DIM_INFO_ORDER, 1

      Cmd.SetToggleString 14, DIM_INFO_LOC, 1
      Cmd.Marked = True
      End If

      But, this code is generating an ICON, HORIZONTAL AND
      VERTICAL ON THE DIMINFO.

      Hope that explains my situation better.

      Thanks again

      Comment


      • #4
        I dont have access to PC-Dmis atm, but there is definitely an entry in the right help file. If you look in the pc-dmis installation directory there is a help file with a name ending with “basic” somewhere. The documentation isn’t stellar, it’s not going to tell you which state correspond with which setting. I’d make a program with a dimension configured as you want it and export as .bas and figure it out from the code.

        Comment


        • #5
          Thanks for your reply LostL. (Does that mean you were a "LOST" fan (T.V. show)??
          I sure was.

          Anyway, when I created the script a while back, that's what I did.
          I was so happy it worked fairly well, I didn't try to fine tune it to get exactly what I
          wanted.
          Just to make sure, I created a vector point with diminfo and exported to .bas file again yesterday.
          This is what I got. Same as what I use except for the retval.

          Set DmisCommand = DmisCommands.Add(DIMENSION_INFORMATION, TRUE)
          DmisCommand.Marked = TRUE
          ' Set Reference Id = LOC592
          retval = DmisCommand.PutText ("LOC592", REF_ID, 0)
          ' Set Show Ids Item 1 =
          retval = DmisCommand.SetToggleString (6, SHOW_IDS, 1)
          ' Set Show Ids Item 2 =
          retval = DmisCommand.SetToggleString (6, SHOW_IDS, 2)
          ' Set Show Headings =
          retval = DmisCommand.SetToggleString (1, SHOW_HEADINGS, 0)
          ' Set Graph Option =
          retval = DmisCommand.SetToggleString (1, GRAPH_OPTION, 0)
          ' Set Dimension Info Order Item 1 = DEV
          retval = DmisCommand.SetToggleString (4, DIM_INFO_ORDER, 1)
          ' Set Dimension Info Location Item 1 = T
          retval = DmisCommand.SetToggleString (14, DIM_INFO_LOC, 1)

          End Sub

          Sub Main

          Part1
          Part2
          Part3
          Part4
          Part5

          DmisPart.RefreshPart
          End Sub


          One interesting thing, is that when I run the script and as it is
          finding the out of tolerance vector points, the code that is generated
          is "red". When the program is finished, the diminfo commands turn
          green and are slightly different than when they are red.
          Don't know what that means.

          Another thought, normally a value of 1 is true and 0 is false.
          I'm gonna try changing some values in for example the SHOW_HEADINGS
          and see what happens.
          Don't have a clue as to what the 14 means in the DIM_INFO_LOC command.

          Thanks for your suggestion.

          Comment


          • #6
            Code:
            SetToggleString(ToggleIndex As Long, DataType As ENUM_FIELD_TYPES, TypeIndex As Long)
            
            ToggleIndex - Indicate the toggle field being changed.
            DataType - ENUM_FIELD_TYPES enumeration.
            TypeIndex - Long value indicating the instance of the supplied field type to use when an object has more than one instance of a field type.
            Last edited by vpt.se; 10-10-2019, 02:05 AM.
            PC-DMIS CAD++ 2o19 R1 SP4

            Comment


            • #7
              When you have run the code, try refreshing the dimension by opening the window for it and just hit ok.

              Comment


              • #8
                Do you mean hitting F9 on the DIMINFO command and putting a check
                in the Deviation and T value checkbox? That updates the output to what I want,
                but I was hoping to automate that.

                Thanks again

                Comment

                widgetinstance 190 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                Working...
                X