T O P I C R E V I E W |
johannes.kastl |
Posted - 08/01/2012 : 08:06:25 AM Hi everyone,
is it possible to set the 'substitution level' for an existing label via labtalk? I only found ways to do this while creating a label, not when modifying an existing one.
'Substitution level' is available via right-click, then programming control, and then setting 'Link to (%, $), Substituion' to 1, 2,... This was called differently in older versions of Origin.
Origin Ver. and Service Release (Select Help-->About Origin): 8.6.0G SR3, Operating System: Windows XP
Regards, Johannes |
3 L A T E S T R E P L I E S (Newest First) |
AKazak |
Posted - 06/06/2022 : 06:42:44 AM quote: Originally posted by johannes.kastl
Thanks a lot, it works.
BTW, is there a document describing the use of the different substitution levels? 0=off, 1=on, 2=? ?
Regards, Johannes
Here it is: https://www.originlab.com/doc/en/Origin-Help/Ob-Prop-Program-tab#The_Link_to_.28.25.2C.24.29.2C_Substitution_Level_Drop-down_List
--- Andrey |
johannes.kastl |
Posted - 08/02/2012 : 04:47:22 AM Thanks a lot, it works.
BTW, is there a document describing the use of the different substitution levels? 0=off, 1=on, 2=? ?
Regards, Johannes |
greg |
Posted - 08/01/2012 : 4:24:04 PM I couldn't find a LabTalk means of doing this, but here is an OriginC function you can use:
void SetLevel(string strObj, int iLevel) { GraphLayer gl= Project.ActiveLayer(); if(gl.IsValid()) { GraphObject go = gl.GraphObjects(strObj); if(go.IsValid()) { if(go.GetObjectType() == "Text") { Tree tr; BOOL bRelative = TRUE; tr = go.GetFormat(FPB_ALL, FOB_ALL, TRUE, bRelative); tr.Root.LinkToVars.nVal = iLevel; go.ApplyFormat(tr, TRUE, bRelative); } else printf("%s is not a Text object.\n", strObj); } else printf("%s is not a valid object in active layer\n",strObj); } else printf("GraphLayer not active.\n"); }
For example, with a graph active and a layer with the Legend active, you can shut off substitution with: SetLevel(Legend,0) and turn it back on with SetLevel(Legend,1)
|
|
|