Cancel
Showing results for 
Search instead for 
Did you mean: 

How to quick change Number generator file

Valued Contributor
Valued Contributor

Hello All,

 

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?

 

Hello @hawcad , @uk_dave can you please check this post and suggest?

 

Regaards,

ASlam

 

 

14 REPLIES 14

Betreff: How to quick change Number generator file

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

Hi @aslam 

 

 

 

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.

 

regards
Wolfgang

Betreff: How to quick change Number generator file

Valued Contributor
Valued Contributor
Hello @hawcad,

Thank you for your reply.

Hello @Tushar, can you please check this post and let us know what time it may require to prepare this macro?
We just need a drop down menu in menu bar to select one .dat file from existing 15 approx .dat files for changing Number generator file when needed.
If the macro is easy and requires less than 1 hour, can you please create the macro?

Regards,
Aslam

Betreff: How to quick change Number generator file

Siemens Phenom Siemens Phenom
Siemens Phenom

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...

2019-04-12 08_11_48-Solid Edge 2019 - Synchronous Part - [Document Number_Revision Number-Title].png

 

2019-04-12 08_12_15-Solid Edge 2019 - Synchronous Part - [Document Number_Revision Number-Title].png

 

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):

2019-04-12 08_17_27-SwitchNumbering.png

 

 

 

Customize your QAT to add shortcuts to call each DOS script file:

 

2019-04-12 08_15_57-Solid Edge 2019 - Synchronous Part - [Document Number_Revision Number-Title].png

 

 

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.

 

Betreff: How to quick change Number generator file

Siemens Phenom Siemens Phenom
Siemens Phenom

@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.

Betreff: How to quick change Number generator file

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

Hi @uk_dave 

 

 

You have spoken out what came into my mind when reading this post!

I would not be able to formulate it any better.

 

 

regards
Wolfgang

Betreff: How to quick change Number generator file

Valued Contributor
Valued Contributor
Hello @uk_dave,

Thank you very much for the solution you suggested.
We will try it and let you know how it goes.

Yes, you are absolutely right about the remuneration.
I apologize to @Tushar and all of you for that post.

Thanks again,

Regards,

Betreff: How to quick change Number generator file

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

Hi @aslam 

Hi @uk_dave 

Hi @Tushar 

 

 

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

 

Important:

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.

 

Usage: 

 

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

 

regards
Wolfgang

Betreff: How to quick change Number generator file

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

@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 Smiley Happy



Ken
Production: SE 2019 MP8, Testing: SE 2020
http://Grundey.blogspot.com
Highlighted

Betreff: How to quick change Number generator file

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

Hi @KennyG 

 

 

 

no thank You very much for giving that info.

I will immediatelly see to implement it.

 

 

regards
Wolfgang