cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

Using the createcontent command line function can I set the indentation level

rteifke
8-Gravel

Using the createcontent command line function can I set the indentation level

I have an application that enters data to a document using the createcontent command line function. How do I set the indentation level when I create the content?

1 ACCEPTED SOLUTION

Accepted Solutions
awalsh
17-Peridot
(To:rteifke)

The indentation level is determined by the --parentID option.

For example, if I have a Requirement Document where the section 3.2 has item ID 7167, then the following command will add the new content at section 3.2.1:

im createcontent --parentID=7167 --type=Requirement --insertLocation=first --field=Category=Comment --field=Text="Testing Insert"

View solution in original post

3 REPLIES 3
awalsh
17-Peridot
(To:rteifke)

The indentation level is determined by the --parentID option.

For example, if I have a Requirement Document where the section 3.2 has item ID 7167, then the following command will add the new content at section 3.2.1:

im createcontent --parentID=7167 --type=Requirement --insertLocation=first --field=Category=Comment --field=Text="Testing Insert"

rteifke
8-Gravel
(To:awalsh)

How would that work if you are adding the following to section 2:

2.1

2.1.1

2.1.2

2.2

2.2.1

2.2.2

...

for each insert I would need to know the parentID?

I use --insertLocation=first and it puts everything at level 1, if I could define the level as I put each line in it would be very helpful.

awalsh
17-Peridot
(To:rteifke)

Yes, you need to know the parentID at each level. You would need to know the Item ID that you create for section 2.1 in order to insert the content for 2.1.1 and 2.1.2, and the Item ID for section 2.2 in order to insert content for 2.2.1, 2.2.2, and so on.

For --insertLocation, the valid options are first, last, before:[Item ID], after:[Item ID]. If you don't specify an insert location, the default is last.

Top Tags