Jump to content


Photo
- - - - -

Programatically specify automation refnum input?


  • Please log in to reply
4 replies to this topic

#1 george seifert

george seifert

    Extremely Active

  • Members
  • PipPipPipPip
  • 398 posts

Posted 31 July 2012 - 03:01 PM

Can I programatically specify the automation refnum input for the Automation Open Function? For some reason my system forgets the link specified in the automation refnum. It would be nice if I could programatically set that value.

George



#2 asbo

asbo

    I have no idea what you're talking about... so:

  • V I Engineering, Inc.
  • 1,273 posts
  • Version:LabVIEW 2011
  • Since:2008

Posted 31 July 2012 - 04:23 PM

I think this is possible through scripting? I feel like someone was trying this on the forum not too long ago. However, the type itself needs to be a constant on the BD at run-time, so if the scripting solution doesn't work, you're hosed.

Can you describe the problem you're having better? Go for the cause, not the symptoms. ;)

#3 george seifert

george seifert

    Extremely Active

  • Members
  • PipPipPipPip
  • 398 posts

Posted 31 July 2012 - 04:33 PM

I don't know all the causes yet, but I'm pretty sure when I shut down LabVIEW and reload my project, the link that I specified for the automation refnum is no longer valid (I did save my project). If I right-click on the refnum and reload the right name everything works. I've never had this problem with other refnums.

#4 asbo

asbo

    I have no idea what you're talking about... so:

  • V I Engineering, Inc.
  • 1,273 posts
  • Version:LabVIEW 2011
  • Since:2008

Posted 31 July 2012 - 05:28 PM

By "no longer valid," you mean all the nodes disassociate with the library? I've seen some re-linking issues when bouncing between versions of Excel. Do you possibly have different versions of the ActiveX control installed that could be swapping around?

#5 george seifert

george seifert

    Extremely Active

  • Members
  • PipPipPipPip
  • 398 posts

Posted 31 July 2012 - 06:08 PM

I guess you could say it disassociates with the library. I get an error when I run the VI that has to do with the library. When I relink it everything is fine. There is another copy of the dll in another directory, but I don't see how it could jump over there and use that one. I registered the dll, but it only works when I browse to the directory where the dll is and use that instead of picking the from the Type Library drop down list. I'm not real impressed with this company's dll in other regards, so I not suprised it's giving me fits like this.

George