SDT-base Contents   Functions      PDF Index |
Purpose
Class constructor for SDT handle objects.
Syntax
methods(sdth) % to list methods
Description
The Structural Dynamics Toolbox now supports SDT handles (sdth objects). Currently implemented types for sdth objects are
SDTRoot | global context information used by the toolbox. This object contains reload commands (typically dock opening) that you may want to bypass and only load the data contained in the saved file. To do so, you must create the variable ReloadAsStruct=1; in your base workspace before executing the load command. |
IDopt | identification options (see idopt) |
FeplotFig | feplot figure handle |
IiplotFig | iiplot figure handle |
VectCor | Vector correlation handle (see ii_mac) |
XF | stack pointer (see xfopt) |
SDT handles are wrapper objects used to give easier access to user interface functions. Thus idopt displays a detailed information of current identification options rather than the numeric values really used.
Only advanced programmers should really need access to the internal structure of SDT handles. The fixed fields of the object are opt, type, data, GHandle (if the sdth object is stored in a graphical object), and vfields.
Most of the information is stored in the variable field storage field vfields and a field of vfields is accessible using GetData. To get the model of a cf FeplotFig, you may use the syntax cf.mdl.GetData.
File utilities handles folder search, canonical path resolution, switches between full and relative path, file locking...
This method aims at recovering dereferenced copies of objects, and sort associated handles. It is documented in sdtweb syntax#GetData as its calls are referenced good coding practice.
os is a short cut method to access comgui objSet.
sdth.os('l.') lists currently loaded OsDic entries. sdth.os('l.Fg') lists a category associated with the first two letters. sdth.os('l.FiCevalz') lists the details of a specific entry.
figure(10);plot([0 1]); sdth.os(10,'ImGrid'); % Apply the ImGrid style using objSet sdth.os('l.im') % List current Im styles ci=iiplot;iicom(ci,'curveInit','Example',demosdt('demoGartteCurve')); ci.osd_('ImGrid','ImLw40') % Apply two styles short cut to command below ci.os_('@OsDic',{'ImGrid','ImLw40'})
urn, stands for Uniform Resource Name, which are used in SDT to designate and/or select GUI objects (for example sdth.urn('Dock.Id.ci') selects the iiplot figure of the identification dock) or model components (for example sdth.urn('Test.DOF',model) will seek a stack entry called Test in the model then extract the associated .DOF field.
For a more extensive list see sdthurn.
Models may contain a .nmap field used to store name maps for nodes, materials, bases, ... examples of usage are given in d_feplot. This field should be a vhandle.nmap object which is a handle associated to maps and more details are given in the documentation of that object but could be a containers.Map object which uses string keys access to values.
findobj implements objects recovery and implements parsing strategies compatible with subsref and subsasgn formats.
Given a graphical object as a first argument findobj overloads the MATLAB findobj command with added robustness. The call is complemented with a findall call is the fondobj command does find anything. The sytax is then the same as for a classical findobj call, as e.g. gf=sdt.findobj(0,'Type','figure','Tag','feplot').
Further commands provides specific object property handling and subs parsing.
~
not to evaluate parsed content into brackets.
Command _subs{} is specific and will use : as splitting character, and will provide a better handling of mainly braces grouped information.Split is performed for each group into braces, brackets or double quotes. Nesting is supported so that the subs output will be levelled by groups, in each subgroup, the entries will be split in the same level using the splitting token.
Groups in double quotes " will not be processed further.
Groups in braces { } will be split.
Groups in brackets( ) will be interpreted or split. Use of @ will be intepreted as a function handle with the higher level. If the group does not start with @ it will be intepreted with eval unless it starts with :. If the _subs command is set with the sixth character as ~
the strings will not be evaluated, but they will be split as for braces groups.
% split and interpret r1=sdth.findobj('_sub.','nmap.Node(1:5)') r1(3).subs % split and do not interpret r1=sdth.findobj('_sub.~','nmap.Node(1:5)') r1(3).subs % split braces group r1=sdth.findobj('_sub{}','MeshCfg{cube:clamped:sine}') % split colon separated list r2=sdth.findobj('_sub:',r1(2).subs{1}) % split braces group and token separation r1=sdth.findobj('_sub{}','MeshCfg{cube,clamped,sine}') % function handle interpretation in brackets groups r1=sdth.findobj('_sub,','feutilb(@unConSel)') functions(r1.subs)
lab=sdth.findobj('_cellgen:','{trans}:{top,bottom}:{X,Y,Z}'); % braces are not mandatory but can improve readability lab=sdth.findobj('_cellgen:','trans:top,bottom:X,Y,Z');As an additional argument one can provide maps to use wild cards in lists. In such case, matching patters in maps will be expanded. Note that all entries must be matched in the maps in such case.
nodeM=vhandle.nmap('Map:Nodes'); nodeM('top1')=1; nodeM('top2')=2; nodeM('bot1')=3; nodeM('bot2')=4; lab=sdth.findobj('_cellgen:','{top*,bot1}:{X,Y,Z}',struct('maps',{{nodeM}}));
See also
feplot, idopt, iiplot, ii_mac, xfopt