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

APIStory_InsAbove bug ?

Oleg
Enthusiast
This command creates a story with wrong heigh ( as height of the previous story) and changes the previous story height (as height of the command parameter).

Environment_Control Example:
"Add a Story" menu test command adds a new story with 3210 height.

Before: Ater:
2 REPLIES 2

Tibor Lorantfy
Graphisoft
Graphisoft
Hi Oleg,

APIStory_InsAbove action inserts a new story X meters above the given story.
So the given height will be set for the already existing story.

It's not a bug, but you're right that the documentation is ambiguous, it should be more clear.

Note, you can modify the height of any stories by using APIStory_SetHeight action.

Regards,
Tibor

Oleg
Enthusiast
I understand you're not considering this a bug.
I will now consider this as a feature.

But In my opinion, it is inconvenient and wrong.
BTW, APIStory_InsBelow works other way, AC16 and early APIStory_InsAbove worked other way

Imagine a typical usage scenario: I need to create a new story with a known height.
If I will use the a APIStory_InsBelow, it will be single clean call. One notification after operation.
If I will use the a APIStory_InsAbove, i need to use a trick:
- to get the existing story height
- to call APIStory_InsAbove with this heigth ( to keep existing story height, else it will be broken )
- to call APIStory_SetHeight to fix the created story height

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!