Controlling read-only status of parts/assemblies
Overview
Since SolidDesigner 3.0 parts/assemblies/workplanes can be
read-only, that is, modifications on such an object are rejected by Creo
Elements/Direct Modeling. However, this functionality was mainly used in
conjunction with a database-integration product, e.g. WorkManager.
Activation
Enter into command line
(load "dbdialog")
Or add this line to your customization file.
Loading this file will create a button in the toolbox.
Description
Creo Elements/Direct Modeling offers a dialog which enables non-database
users to easily inquire/set/change the read-only status of any 'object' that
can be stored/loaded into Creo Elements/Direct Modeling.
The new dialog (terminate action) is:
OBJFLAGS -+- <select object>----+-- :Q_CONTENTS --+----+
| | | |
| +-- :Q_INSTANCE --+ |
| |
| +--------------<---------------------+
| |
| V
| |
| +->-+--- :Q_DBRO ---+-----+-- :ON ---+---+-- COMPLETE -->
| | | | | | |
| | +--- :Q_DBMOD ---+ +-- :OFF --+ |
| | | | |
| ^ +--- :Q_SDRO ---+ V
| | | | |
| | +--- :Q_SDMOD ---+ |
| | |
| +------------------<----------------------+
| |
+---<---+------------------<----------------------+
- <select object>
- is any (single) object that is suitable for filing (see SAVE_SD
command), e.g. part, assembly, workplane, workplane set.
- :Q_CONTENTS
- selects the 'contents' portion of the object for inquiry/modification
of flags. This is the default when the dialog is entered.
- :Q_INSTANCE
- selects the 'instance' portion of the object for inquiry/modification
of flags.
Flags to be inquired/set by the dialog:
After the user has selected an object (part, assembly etc.) the dialog
will display the current 'flag' settings of the object and can therefore be
used as a visual inquiry function.
However the dialog also allows to set/reset each of the 4 following flags
by entering the flags 'type' followed by either :ON to set the flag or :OFF
to reset the flag.
The following flags can be controlled:
- :Q_SDRO Creo Elements/Direct Modeling Read-Only Flag
- Setting this flag to :ON will make the object read-only. Creo
Elements/Direct Modeling will disallow modifications of this object.
Setting this flag to :OFF will make the object modifiable.
NOTE: This flag controls the read-only/modifiable status of an
object 'inside' a single Creo Elements/Direct Modeling session. If an
object is saved with any of the SAVE_SD, SAVE_SD_MODIFIED and SAVE_PACKAGE
commands, the read-only status will not be contained in the file. When an
object is loaded into a different Creo Elements/Direct Modeling session,
it will no longer be read-only. Setting this flag to :ON is therefore
intended for users who want to temporarily disable changes to an object.
For setting a 'non-volatile' read-only status of an object, refer to the
:Q_DBRO flag described below.
- :Q_SDMOD Creo Elements/Direct Modeling Modified Flag
- Setting this flag to :ON marks the object as modified. This flag is
used by the command SAVE_SD_MODIFIED which stores only modified
objects.
NOTE: This flag can only be reset by the SAVE_SD and
SAVE_SD_MODIFIED commands. It is not possible to set this flag to :OFF by
this dialog.
- :Q_DBRO Data Base Read-Only Flag
- Setting of this flag to :ON makes the object read-only. But in
contrast to the :Q_SDRO mentioned above, the :Q_DBRO flag is a persistent
flag which is contained in the file when the object is saved. This means
that the object will be read-only when it is loaded from disk.
- :Q_DBMOD Data Base Modified Flag
- Setting of this flag to :ON marks this object as modified from the
database point of view. This is used by database integrations (e.g.
WorkManager) to decide if an object needs to be saved into the database.
This behavior is similar to the SAVE_SD_MODIFIED command, which uses the
:Q_SDMOD flag to decide which objects need to be saved.
Notes
There are several interdependencies between the flags described
above:
- Any change to any of the flags sets the Q_SDMOD flag to :ON . As
mentioned above, this flag cannot be reset with this dialog.
- Setting the Q_DBRO to :ON automatically sets the Q_SDRO flag to :ON as
well.
- When the Q_DBRO flag is set, the Q_SDRO cannot be changed. You first
have to reset the Q_DBRO to :OFF before you can change the Q_SDRO
flag.
- When Q_DBRO is not set, but the Q_SDRO flag is set to :ON, the object
is read-only inside the Creo Elements/Direct Modeling session, but when
the object is saved and loaded into another Creo Elements/Direct Modeling,
it will not be read-only. The Q_SDRO flag can therefore be used to
temporarily prevent modifications of the object, whereas the Q_DBRO must
be used to keep the read-only status between different Creo
Elements/Direct Modeling sessions.
Warnings
- You shouldn't modify any of the flags when you use MODELING_NAME
together with a database integration product (e.g. WorkManager), since
these products heavily depend on the correct settings of the flags
mentioned above. In this case you should use the dialog only for inquiry
purposes. Changing the flags while you are using WorkManager and/or other
database products may result in data loss, database corruption or any
other kind of nasty problem.
- Usage of this dialog is recommended for customers who want to
implement their own 'small' database solution which makes use of Creo
Elements/Direct Modeling's read-only capabilities.
- You should also be prepared that the name of this dialog may be
changed in the future. However, since Creo Elements/Direct Modeling always
guarantees upwards-compatibility for the loading of old data files, you
can expect that data files containing read-only flags (the Q_DBRO flag)
will continue to produce read-only objects when they are loaded into
future Creo Elements/Direct Modeling versions.
© 2024 Parametric
Technology GmbH
(a subsidiary of PTC Inc.), All Rights Reserved |