hexagon logo

Reset to nominals

Here's one...

I got it from WILCOX
Parents
  • 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:
    '
    '  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:
    '
    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.
Reply
  • 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:
    '
    '  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:
    '
    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.
Children
No Data