hexagon logo

PC-Dmis Automation C#

So I retired as of last July, but had all this stuff about PC-Dmis Automation which I've finally got around to uploading. Don't know it it is of any interest, but here it is.

The zip file has to Visual Studio project folders, both written in C#. One folder is a Class Library which has all the code for connecting with and dynamically interacting with PC-Dmis. The second folder is a C# application with uses the Class Library to connect and interact with PC-Dmis.

I also included two documents one explains how to setup the two Projects the other is about the application program.

Rather than trying to anticipate every possible question, the provided documents should be sufficient for someone familiar with visual studio and C#. Otherwise, I'll watch for questions to show up here. I can't promise to answer every question, given the complexity of what the answer might require. But I have taken phone calls and zoom opens up the possibility to demo live.

Good Luck

https://drive.google.com/drive/folders/1EDMe0GvN6TC_0Fcr_7Zt7_UqH-EV_8o2?usp=sharing
Parents
  • I saw in another posting here in the forum, someone asking about a way to replace all the plus/minus tolerances in a program with new values. Apparently, there being a lot of dimensions to modify. I was interested to see why the Visual VB script was taken so long versions the internal basic script (Cypress). The program I used is a modification of the above 'BareBones' code. The test PC-Dmis program has 1028 Dimensions, both the plus and minus tol values are modified by the application.

    In this first iteration, I only looped through the entire program looking for dimension type commands and counting them. No conversion of the found command to a dimension command nor were the tol values replaced.



    You can see it took 20 seconds to loop through the entire program, finding 1028 dimension type commands.

    Next, I added the step to convert the command to a dimension command, a required step in order to access the plus/minus tol values. The process of getting the dimension command appears to be a casting operation, which in C#, is a somewhat time expensive operation.



    You can see this took some forty-two seconds, about double the previous time.

    Next, I added the update to both the plus and minus values, replacing them with the two values from the user interface.



    You can see that this final step to update the tol values required 2 minutes and 10 seconds. Keep in mind that 2056 tol values were replaced in 1028 dimensions. which works out to .126 seconds per dimension.
Reply
  • I saw in another posting here in the forum, someone asking about a way to replace all the plus/minus tolerances in a program with new values. Apparently, there being a lot of dimensions to modify. I was interested to see why the Visual VB script was taken so long versions the internal basic script (Cypress). The program I used is a modification of the above 'BareBones' code. The test PC-Dmis program has 1028 Dimensions, both the plus and minus tol values are modified by the application.

    In this first iteration, I only looped through the entire program looking for dimension type commands and counting them. No conversion of the found command to a dimension command nor were the tol values replaced.



    You can see it took 20 seconds to loop through the entire program, finding 1028 dimension type commands.

    Next, I added the step to convert the command to a dimension command, a required step in order to access the plus/minus tol values. The process of getting the dimension command appears to be a casting operation, which in C#, is a somewhat time expensive operation.



    You can see this took some forty-two seconds, about double the previous time.

    Next, I added the update to both the plus and minus values, replacing them with the two values from the user interface.



    You can see that this final step to update the tol values required 2 minutes and 10 seconds. Keep in mind that 2056 tol values were replaced in 1028 dimensions. which works out to .126 seconds per dimension.
Children
No Data