We have different part or sub-assembly types. For each type, they have different numbers.
So we have created different Number generator.dat files for each type.
Say for plate, we have created Number generator-PLATE.dat.
In this way the last used number is saved in each .dat file for the relevant part or sub-assembly type.
The issue is, whenever we have to create a plate, we have to go to solid edge options window and choose the plate .dat file. When we need another file type like frame, then we again have to go to to solid edge options window and choose the plate .dat file.
Frequently it happens that, we forgot to change the .dat file while shifting to one part type creation to another. Like we created a new frame part using plate.dat file. And it is also little bit time consuming to go to solid edge options window every time and change the .dat file.
Is there any quickest way to change the .dat files? Like making a dropdown in tool bar?
Or is there any other easy way to acheive what we have done?
Solved! Go to Solution.
I do not know any other way or method to achieve what You are requesting other than Your already found solution.
The only You can improve is, to do it automized using an API macro for changing the appropriate option/file that way.
But this also will not prevent the user from not using it, forgetting it, ignoring it and using a wrong number at all.
Finally You should consider an unique and automated document number as that what it is.
And automatically generated number, the next free number.
You also can not and do not want to influence the record number in a database for example.
You just use it as unique identifier.
Infos are defined in different property fields.
Think about that.
Logical and speaking number always will come to their limits.
As @hawcad states, there is nothing built in to allow you to do this.
You will require some sort of custom solution to accomplish this.
With that said, I was able to throw together a quick hack workaround...
All you need to do is create sets of registry scripts to change the underlying Solid Edge user settings to point to the desired numbering files, create batch files to read in those registry scripts, and then add shortcuts on the QAT to run the DOS batch files..
The files in use (copies attached):
Customize your QAT to add shortcuts to call each DOS script file:
This does have limitations but it is merely a starting point to show you what can be quickly done.
If it were me I would use this to then build up and flesh out a more robust solution. You could either continue with a scripting solution either as DOS batch commands or PowerShell, including provide a command window pop up menu selector. Or if you are more comfortable with Visual Studio a quick VB form to allow menu selections. Either way, the registry scripts are not necessary and can be hard coded in to the application called from the QAT shortcut.
Regardless, the solution is to provide some form of mechanism to change the Solid Edge user registry settings on the fly.
@aslam did you really just come out and ask @Tushar to provide his services? I assume because you have not offered remuneration that you are expecting this custom solution for free? So if the macro takes less than an hour you expect it for free but if it is longer than an hour you will not obligate Tushar to do this nor will you offer to pay? So less than an hour of time spent on providing you some sort of specialized solution is not considered worth rewarding?
Sorry but this is not an issue of whether a macro is easy to throw together or not, it is an issue of you should be paying for a person’s knowledge if you are requesting a specific custom solution, which you clearly have.
After all, if the macro was easy you would do it for yourself and not be asking others to provide their services for free.
My apologies Tushar if I have spoken out of turn for you but I found the request more than a little cheeky.
I have written such a macro to automatically change the file/path and the prefix for the NumberGeneartor entries in Solid Edge Current User Registry
the usage of this macro is in behalf of Your own and any registry changes always can destroy certain settings of Your software installation.
But I have used and tested it here several times without any issues.
The macro reads all files of type ".dat" in the application folder (where the macro is stored) and puts them into a list.
Clicking onto any of those list items will change the current user registry path for the Number Generator File.
Afterwards the macro searches for a file with the same name but with the ending ".prefix" and reads the second line of it.
This text there will be used for the Document Prefix field of SE.
Hope it helps!
PS.: macro at the moment is hard coded for Solid Edge 2019
@hawcad Are you aware of the SE API's Application.RegistryPath property? It will return the path to the HKEY_CURRENT_USER registry hive for Solid Edge and thus make it easy to code for any version of SE.
I recently discovered this as I was previously hard coding for the path minus the version which I got using another method and with the path change to "Siemens" it messed up my macros. Using the above mentioned property makes it much easier and should survive any version change of SE