Changing Background with Macro

Honored Contributor
Honored Contributor

Hi Edgers,

 

I know, this is an issue for a long time, but I'm not absoluteley confident wether or not a mcaro exists which let You change the background to a current look.

 

First I thought the OpenSave macro will do this, when activating the 3D View Style button but it doens't.

 

The goal is, to have a single button to click for applying a certain viewstyle for background (gradient, single color) with certain settings, so that it get a current lookalike

 

 

I think it would help a lot if this could be done for the current par/psm/asm but man also can think about a batch tool too.

 

I already have searched for that but didn't find anything till now.

 

Thanks and regards for any hint and tips or links.

 

 



regards
Wolfgang
10 REPLIES

Re: Changing Background with Macro

I am not aware of any.  In the past there was no API calls to change this.

 

I know we have added new functionality in the UI so i took a quick glance and it appears that the "PartFormatFormatView" is still a command constant that only enables the View Overrides dialog.  I dont see any methods to set the Background from teh API.

 

Hopefully someone proves me wrong...???

===================================================
Matt Johnson
Solid Edge Certified Professional (ST7 & ST8)
Solid Edge ST9 (SEEC) - Production
NX10 (Tc Integration) Pre-Production Testing
Teamcenter 10.1.6

Re: Changing Background with Macro

@hawcad

 

Good News!  

 

According to this post: https://community.plm.automation.siemens.com/t5/Solid-Edge-Developer-Forum/Background-color-with-Bac...

 

This can now be done...

 

Maybe @MartinBernhard would be willing to assist? (Pretty Please Martin)

 

 

===================================================
Matt Johnson
Solid Edge Certified Professional (ST7 & ST8)
Solid Edge ST9 (SEEC) - Production
NX10 (Tc Integration) Pre-Production Testing
Teamcenter 10.1.6

Re: Changing Background with Macro

Honored Contributor
Honored Contributor

Hi @MattJohnson_PG

 

 

thanks for digging into the deepspace of Solid Edge API.

 

The methods of how to change the background already was known.

 

I thought that there was a ready macro still exisiting to change it the one click.

 

It seems, that this is not the case, so I have to prepare it by myself.

 

I will let You take part and share the result with the community.

But please, I cann't promise it how fast I will have time to finish it.

 

Another question to all the people who are more involved into the secrets of ST10 would be, wether there will be a build-in function or a code change for view style settings, to let the user define how he looks onto a Solid Edge document.

 

 



regards
Wolfgang

Re: Changing Background with Macro

Legend
Legend

Hi Wolfgang,

you could try the Model Styler. It can copy the viewstyle settings from a template file to the actually opend file. It has much more settings. Give it a try.

Model Styler

 

Greetings from Germany
Christian Kunkel
https://c-k-m.info

Re: Changing Background with Macro

Phenom
Phenom

Hi,

 

I've already used @ckunkel72's macro & it works perfectly. Thanks for it! Smiley Wink

 

BR,

Imics
http://solidedgest.wordpress.com/

Re: Changing Background with Macro

Valued Contributor
Valued Contributor

We have an internal macro (not sure who developed it) which we use to delete and swap the background for drafts based on a new template.  There is a batch mode as well for use on projects.

2017-05-11 09_41_40-Solid Edge ST8 - Draft - [Draft1].jpg

 

Is this the sort of thing you mean?  I am sure there was a tool online as well which provides this function.

 

Guy


CAD/CAE Manager
ST8 MP12

Re: Changing Background with Macro

Honored Contributor
Honored Contributor

Hi @Guy_H77

 

 

 

thanks a lot for the offer to use Your macro.

 

But my question more was going into the direction of the colored background withi a 3D Solid Edge file.

The default colro and scheme has changed so often over the years that we have a huge miscellany of files all looking different and "old fashioned" nowadays.

 

So we want to bring them all to the current color scheme of ST9 with a grey gradient background.

And to do this manually in every single document might be a little time consuming.

And therefore I will prepare a toll to either to it on call when openening such a file per single mous click or even to start a batch job for several of those old file - per job/project sotosay.

 

 

 



regards
Wolfgang

Re: Changing Background with Macro

Honored Contributor
Honored Contributor

Hi @ckunkel72

 

 

 

sorry for a double posting but I already have asked in the original link, but will it do here too:

 

Thanks for sharing Your tool.

 

Question: there is no option for copy and set the background of the 3D file, isn't it?

Or have I overlooked it?

 



regards
Wolfgang

Re: Changing Background with Macro

Esteemed Contributor
Esteemed Contributor

@hawcad One such option might be a Solid Edge Add-in that changes the background on open.  We have one that sets up view styles on save and in the past, where applying one of the view styles.  I can't really share the add-in as it has a lot of other code in it as well but can share the code for creating and setting a view style.

 

On another note, I've agued for the past few years that the Gradient background should be treated like the Solid background and should be user specific, not file specific.  Why 2 things that are essentially the same with different options are stored differently in SE.  Never made any sense...


Thanks,
Ken

Production: ST9 MP10
Testing: ST10 MP1