vb6 line error

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

  • vb6 line error

    I created a script in vb6 to create a part of the program but it generates me some errors.
    I don't understand why you don't create lin 1.
    Can someone help me find the error or solution to my problem.

    I add part of my code and what happens on the pc-dmis.

    vb6

    Set PCDCommand = PCDCommands.Add(CONST_BFRE_LINE, True)
    PCDCommand.Marked = True
    RetVal = PCDCommand.PutText("p1", REF_ID, 1)
    RetVal = PCDCommand.PutText("p2", REF_ID, 2)
    RetVal = PCDCommand.PutText("LIN1", ID, 0)
    RetVal = PCDCommand.SetToggleString(2, TWO_D_THREE_D_TYPE, 0)
    RetVal = PCDCommand.SetToggleString(2, TWO_D_THREE_D_TYPE, 0)

    Set PCDCommand = PCDCommands.Add(CONST_BFRE_LINE, True)
    PCDCommand.Marked = True
    RetVal = PCDCommand.PutText("p4", REF_ID, 1)
    RetVal = PCDCommand.PutText("p3", REF_ID, 2)
    RetVal = PCDCommand.PutText("LIN2", ID, 0)
    RetVal = PCDCommand.SetToggleString(2, TWO_D_THREE_D_TYPE, 0)
    RetVal = PCDCommand.SetToggleString(2, TWO_D_THREE_D_TYPE, 0)

    Set PCDCommand = PCDCommands.Add(CONST_BFRE_LINE, True)
    PCDCommand.Marked = True
    RetVal = PCDCommand.PutText("p6", REF_ID, 1)
    RetVal = PCDCommand.PutText("p5", REF_ID, 2)
    RetVal = PCDCommand.PutText("LIN3", ID, 0)
    RetVal = PCDCommand.SetToggleString(2, TWO_D_THREE_D_TYPE, 0)
    RetVal = PCDCommand.SetToggleString(2, TWO_D_THREE_D_TYPE, 0)

    Set PCDCommand = PCDCommands.Add(CONST_BFRE_LINE, True)
    PCDCommand.Marked = True
    RetVal = PCDCommand.PutText("p7", REF_ID, 1)
    RetVal = PCDCommand.PutText("p8", REF_ID, 2)
    RetVal = PCDCommand.PutText("LIN4", ID, 0)
    RetVal = PCDCommand.SetToggleString(2, TWO_D_THREE_D_TYPE, 0)
    RetVal = PCDCommand.SetToggleString(2, TWO_D_THREE_D_TYPE, 0)

    pc dmis
    WORKPLANE/ZPLUS
    MOVE/CLEARPLANE
    LIN1 =FEAT/LINE,CARTESIAN,UNBOUNDED,NO
    THEO/<-4.5,8,-2>,<1,0,0>
    ACTL/<0,0,0>,<0,0,1>
    CONSTR/LINE,BFRE,3D,p1,p2,,
    OUTLIER_REMOVAL/OFF,3
    FILTER/OFF,WAVELENGTH=0
    LIN2 =FEAT/LINE,CARTESIAN,UNBOUNDED,NO
    THEO/<8,-4.5,-2>,<0,1,0>
    ACTL/<7.504,-4.5,-1.504>,<0,1,0>
    CONSTR/LINE,BFRE,3D,p4,p3,,
    OUTLIER_REMOVAL/OFF,3
    FILTER/OFF,WAVELENGTH=0
    LIN3 =FEAT/LINE,CARTESIAN,UNBOUNDED,NO
    THEO/<-4.5,-8,-2>,<1,0,0>
    ACTL/<-4.5,-7.504,-1.504>,<1,0,0>
    CONSTR/LINE,BFRE,3D,p6,p5,,
    OUTLIER_REMOVAL/OFF,3
    FILTER/OFF,WAVELENGTH=0
    LIN4 =FEAT/LINE,CARTESIAN,UNBOUNDED,NO
    THEO/<-8,-4.5,-2>,<0,1,0>
    ACTL/<-7.504,-4.5,-1.504>,<0,1,0>
    CONSTR/LINE,BFRE,3D,p7,p8,,
    OUTLIER_REMOVAL/OFF,3
    FILTER/OFF,WAVELENGTH=0



  • #2
    What are the actual coordinates for p1 and p2? Maybe the line is so short you don't "see" it in the graphical display? LIN1 is apparently being created.
    PC-DMIS CAD++ 2o19 R1 SP9

    Comment


    • #3
      these are the (p1 and p2)

      MOVE/CLEARPLANE
      P1 =FEAT/CONTACT/VECTOR POINT/DEFAULT,CARTESIAN
      THEO/<-4.5,8,-2>,<0,1,0>
      ACTL/<-4.5,7.504,-1.504>,<0,1,0>
      TARG/<-4.5,8,-2>,<0,1,0>
      SNAP=NO
      SHOW FEATURE PARAMETERS=NO
      SHOW CONTACT PARAMETERS=YES
      AVOIDANCE MOVE=NO,DISTANCE=0
      SHOW HITS=NO
      MOVE/CLEARPLANE
      P2 =FEAT/CONTACT/VECTOR POINT/DEFAULT,CARTESIAN
      THEO/<4.5,8,-2>,<0,1,0>
      ACTL/<4.5,7.504,-1.504>,<0,1,0>
      TARG/<4.5,8,-2>,<0,1,0>
      SNAP=NO
      SHOW FEATURE PARAMETERS=NO
      SHOW CONTACT PARAMETERS=YES
      AVOIDANCE MOVE=NO,DISTANCE=0
      SHOW HITS=NO

      Comment


      • #4
        you may have already found a solution.
        I changed the lines from (bf recomp to best fit).
        I will test during today.

        Comment

        Related Topics

        Collapse

        Working...
        X