I cann,t get outline level

I uploaded a template document where the paragraph headings already have custom formatting applied. The outline levels in the paragraph management section cannot be modified, and I am unable to retrieve the outline levels using the API GetOutlineLvl, I only get undefined as the return value.

Hello @yihong
Sorry for the late reply. Please share a test file and exact steps to reproduce the situations. We’ll check it out.


![b56213c4-93ba-44e6-9984-aa06f98342d6|690x350]

First, I set the style and outline level at position 1, where the outline level of the style is editable. Then I add a new style named “测试” at position 2. Next, I select a line at position 3 and directly apply the style by clicking position 4. However, when I check the paragraph style of position 3, the outline level is not editable , and it cannot be retrieved via the API either.
首先我在1处设置好样式和大纲层级,这个样式的大纲层级是可以编辑的,然后2处新增样式“测试“ 。我另外选择一行3,点击4直接引用样式。点击查看3的段落样式,大纲层级不能编辑,并且也不能通过api拿到

@Alexandre

Hello @yihong
We’re checking the situation. I will contact you as soon as possible.

Dear @yihong
You can check outlinelvl this way:

var p = Api.CreateParagraph();
p.AddText("test");
p.GetParaPr().SetOutlineLvl(2);
Api.GetDocument().Push(p);
var outlineValue = p.GetParaPr().GetOutlineLvl();
console.log(outlineValue);

Also, please bear in mind that since style is applied to the paragraph, the OutlineLvl value should be checked in the style settings, not a paragraph settings.

let doc = Api.GetDocument();
let para = doc.GetElement(0);
let heading6Style = doc.GetStyle("Heading 6");
para.SetStyle(heading6Style);

console.log(`Para Outline: ${para.GetParaPr().GetOutlineLvl()}`);

console.log(`Style Outline: ${heading6Style.GetParaPr().GetOutlineLvl()}`);

Please let us know if this way works for you.

我通过SetOutlineLvl去设置大纲等级后GetOutlineLvl是能拿到的。但是如果我是在文档上用鼠标操作的时候,就取不到。

请您详细描述逐步的使用场景。
我们需要了解在尝试获取 GetOutlineLvl 时,您是在文件中如何具体使用鼠标进行操作的,以便我们复现并验证该场景。


@Alexandre

你好 @yihong

感谢您提供的视频。我们需要一些时间进行核查,请耐心等待回复。

我们在所描述的场景中发现了一个缺陷(内部编号 78831)。我们已经开始着手处理该问题。感谢您提供的视频!

如何查询你们现在更新的版本是否修改这个缺陷,我看你们更新了9.3版本

请看这里: