Question related to VB and particular line of code

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

  • Question related to VB and particular line of code

    Hi All,

    trying to learn VB in conjunction with PCDMIS via Hexagons online course related to scripting. Tried looking here on the forum...any vb experts please help.

    The following code

    Code:
    Private Sub RunPartProgram(ByVal prg As String)
    GetHeaderInfo()
    app = CreateObject("PCDLRN.Application")
    parts.Open(prg, "CMM")
    part = app.ActivePartProgram
    part.Execute()
    part.Close()
    app.quit()
    
    releaseObject(app)
    releaseObject(parts)
    releaseObject(part)
    End Sub
    Gives me an error related to GetHeaderInfo() indicating "GetHeaderInfo' is not declared. This is straight off Hexagons slide and i'm guessing its should be referencing the PCDLRN but i looked through it and didn't find any coding related to GetHeaderInfo()...

    i'm running PCDMIS 2018 R1 - has this code changed since the making of the slide lessons?

    thank you
    Brown & Sharpe / PC-DMIS 3.7
    Eph 2:8-9 / 1 Thes 5:21 - Who or What are you living for?

  • #2
    Code:
    GetHeaderInfo()
    Is a call to a function.

    Imagine wanting to square a number... Here's a plausible definition of square:
    Code:
    int square(int x) // return the square of x
    {
        return x*x;
    }
    written in C++

    Look for 'GetHeaderInfo' in your material and copy it somewhere outside 'Private Sub RunPartProgram' or just omit it altogether.
    Last edited by Kp61dude!; 04-18-2020, 11:18 AM.
    PcDmis 2015.1 SP10 CAD++
    Global 7-10-7 DC800S

    Comment

    Related Topics

    Collapse

    Working...
    X