hexagon logo

VB.NET .GetVariableValue("NAME")

How do you pull variable values from PCD program using VB.NET?

I know how to do it with VBA and BASIC etc.... but how do you do it with VB.NET, I can get variable name but no values!

Any help, thanks.

***Edit***

My code works I just hadn't ran PcD to 'load' the variables with values....HAHAHAHA!!!!!!!!!!!!!!!
Parents
  • Awesome work! I'm just now starting to dabble in VB.NET myself but i have to ask the question...

    why didn't you just use the excel output built into PCD?


    Thanks! VB.NET is cool, most people say to work with C# instead but meh gets the job done. Why not the built in excel? To make life interesting! On a more serious note... RANGES in a report. Mostly everything out there is built around the FAI but I need to be able to populate ranges (high/low) along with FAIs. Plus GUIs, SQL, PLC programming, etc... Output to a CSV isn't the reason for my exploration into witting this more like an excuse.

    AND the reason why most of "us" get into it....cuz it's cool/fun!

    You'd have to play around with the p2x file to get the output in the format shown above, instead of investing the time in that and implementing it to all my programs (a subroutine would probably be best) and maintenance it is just so much easier writing a widget in VB.NET IMHO.
  • I'm with Kp61. I've been unable to get DP+ to work with PC-DMIS 2017 yet. I've tried just about everything you find in the help in both PC-DMIS and DP+. To say the least, it's confusing. I'm trying to use the STATS/ON command but keep getting and error Database[] could not be opened. I can't get anything to show up when I hit the "TEST CONNECTION" button. I've even tried the Demo database and it still doesn't work. Anyone have any idea how to get this working and what exactly I have to do?
Reply
  • I'm with Kp61. I've been unable to get DP+ to work with PC-DMIS 2017 yet. I've tried just about everything you find in the help in both PC-DMIS and DP+. To say the least, it's confusing. I'm trying to use the STATS/ON command but keep getting and error Database[] could not be opened. I can't get anything to show up when I hit the "TEST CONNECTION" button. I've even tried the Demo database and it still doesn't work. Anyone have any idea how to get this working and what exactly I have to do?
Children
No Data