#1
|
|||
|
|||
Save & Restore Annotation settings?
Hello,
We have a few old utilities for annotation which we've found leave the user's annotation settings in "Compatible" mode after being run. This is due to the way they set certain text or geometry settings to use while creating the text and/or geometry they are designed to generate. With the new Annotation settings scheme on v15.x, what is the clean and recommended way to avoid this issue? Is there a good and fairly simple way to update this kind of utility so it can save the current settings and then later restore them after doing its job? |
#2
|
|||
|
|||
Re: Save & Restore Annotation settings?
Hello coroto,
Quote:
Unfortunately we don't have on-the-fly settings for geometry (yet). Here the recommended way is to use the Integration Kit functions sd-freeze/unfreeze-setting-value on the geometry settings branch. Hope this helps. Markus |
#3
|
|||
|
|||
Re: Save & Restore Annotation settings?
I'd recommend creating a new text style in the table.
If you want the text to be a different size, color or font, just set it up and give it a new name. I would not change one of the defaults, just create a new one. Now you can call that text to be used throughout the rest of the default settings where text is used. Same with the geometry. |
#4
|
|||
|
|||
Re: Save & Restore Annotation settings?
Thanks for your replies.
Markus, can you please give an example of creating text using this "on-the-fly" technique? I'm not sure I know what you're referring to. The freeze/unfreeze is really good to know about; I hadn't spotted that in the I-Kit before! However, in this one utility I'm looking at, the issue is this: the old commands AM_TEXT_SETTINGS and AM_GEO_DEFAULT are used ahead of the create commands, and the freezing/unfreezing I've added into the mix doesn't prevent my Settings from ending up in "Compatible" mode. The text is created using sd-am-create-text and the geometry by sd-am-create-geo-straight. Hmm, looks like I have more digging/rewriting to do! Aha, if I freeze/unfreeze ALL the settings then it does get me back where I was (i.e. not "Compatible"), but just doing the Annotation/Text and Annotation/Geometry paths lands me in the dreaded "Compatible" state. Interesting... Last edited by coroto; 01-15-2008 at 02:48 PM. |
#5
|
||||
|
||||
Re: Save & Restore Annotation settings?
well for texts you can directly call the dialog and use the on-the-fly-settings.
so instead of PHP Code:
PHP Code:
For GEO the on-the-fly-settings are not available. That's a pity. But freeze/unfreeze is also easier than restoring every single setting.
__________________
|
#6
|
||||
|
||||
Re: Save & Restore Annotation settings?
Quote:
If you freeze the "Annotation/Text" path you can do want you want below this node Then you use unfreeze "Annotation/Text" and everything is gone. (hopefully not OSDM ) You can call freeze/unfreeze on command line and play arround in between interactively with the settings browser. This might be easier to watch out what your are doing. One more tip: open the console window! If old setting functions are called (which are covered by the settings browser now) an information is printed into the console window. So it might be there's a call to another setting you did not notice yet. The information in the console shows you WHAT old function was called (so you can search your sources) and WHICH new setting is to be used as replacement. Only when NONE of the old setting functions is used you will get rid of the 'compatible' style... in your piece of code. HTH Wolfgang
__________________
|
#7
|
|||
|
|||
Re: Save & Restore Annotation settings?
Wolfgang,
Thanks for the example for am_create_text. I was trying to use the integration kit function sd-am-create-text instead, which doesn't provide the on-the-fly properties setting. So, it's easy to get rid of the calls to am_text_settings. The problem I have is that a single call to am_geo_default (or am_text_settings, for that matter) will cause my Annotation settings to go "Compatible" -- and it affects all of these settings (regardless of what values were or were not set/changed): the Annotation/Text/Appearance, the Annotation/Geometry/Standard Line Style, the Annotation/Geometry/Construction Line Style, and also the Annotation/Hatch/Appearance. So, I've had to freeze/unfreeze all the settings to make it go back to where things were. I tried doing the freeze/unfreeze on the 3 paths Annotation/Text, Annotation/Geometry and Annotation/Hatch, and even on the whole Annotation path, to no avail. The only sequence which gets everything back to normal is like this: (oli:sd-freeze-setting-value) (am_geo_default) (oli:sd-unfreeze-setting-value) Anyways, thanks for your help, and I appreciate it when you point out something I'm doing wrong. It looks like what I really need to do is get rid of all those old obsolete commands, and not try to use the "band-aid" of the freeze/unfreeze-all. If I get rid of the obsolete commands, then the freeze/unfreeze of the particular path for the specific settings I'm tweaking will probably work as it should. Last edited by coroto; 01-16-2008 at 12:37 PM. |
#8
|
||||
|
||||
Re: Save & Restore Annotation settings?
Quote:
Quote:
PHP Code:
SD-SET-SETTING-VALUE does activate that style for standard geometry as default. Be aware of singular and plural for the functions names. This makes it sometimes difficult to find the right typo. next round....
__________________
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|