# Return SU\_ERROR\_NO\_DATA when call SUApplicationGetActiveModel in Sketchup 2022

**URL:** <https://forums.sketchup.com/t/return-su-error-no-data-when-call-suapplicationgetactivemodel-in-sketchup-2022/320965>\
**Category:** SketchUp SDK\
**Tags:** sketchup-live\
**Created:** [March 27, 2025, 7:55am UTC](https://forums.sketchup.com/t/return-su-error-no-data-when-call-suapplicationgetactivemodel-in-sketchup-2022/320965 "2025-03-27T07:55:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![javalitterboy](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/javalitterboy/32/170896_2.png) [@javalitterboy](https://forums.sketchup.com/u/javalitterboy)\
**Post date:** [March 27, 2025, 7:55am UTC](https://forums.sketchup.com/t/return-su-error-no-data-when-call-suapplicationgetactivemodel-in-sketchup-2022/320965/1 "2025-03-27T07:55:02Z")

</div>

Sketchup Version : 22.0.354  
Windows Version : win10  
SDK Version : 2022.0.354

[Return SU\_ERROR\_NO\_DATA when call SUApplicationGetActiveModel in Sketchup 2022 · Issue #1039 · SketchUp/api-issue-tracker](https://github.com/SketchUp/api-issue-tracker/issues/1039)

### C/C++ code

```auto

#include <ruby.h>
#include <SketchUpAPI/sketchup.h>
#include <SketchUpAPI/application/ruby_api.h>

VALUE async_edge_data(int argc, VALUE* argv, VALUE self) {
	SUModelRef model = SU_INVALID;
	SUResult res = SUApplicationGetActiveModel(&model);
	return rb_int2inum(res);
}
VALUE example= rb_define_module("Example");
rb_define_module_function(example, "async_edge_data", VALUEFUNC(async_edge_data), -1);

```

### Ruby code

```ruby
Example.async_edge_data
=>9

```

 ![image](https://global.discourse-cdn.com/sketchup/original/3X/7/d/7deee7c4a3731d4d6e37fe678acfdacdd9e1c190.png)

---

<div class="post-metadata">

**Author:** ![TommyK](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/tommyk/32/2998_2.png) [@TommyK](https://forums.sketchup.com/u/TommyK)\
**Post date:** [November 24, 2025, 10:21pm UTC](https://forums.sketchup.com/t/return-su-error-no-data-when-call-suapplicationgetactivemodel-in-sketchup-2022/320965/2 "2025-11-24T22:21:39Z")

</div>

Just want to enquire further on this issue. I am struggling to get SUApplicationGetActiveModel() working myself. I know it needs to be linked against the Bundle Loader of the Sketchup Application (I’m on MacOS). I am also getting a [SU\_ERROR\_NO\_DATA](https://extensions.sketchup.com/developers/sketchup_c_api/sketchup/common_8h.html#a2f14198fe6741c51570c7c666c32a674a2c781334caffc763a80f3f3a20ea6cab) issue. I have other parts of my Ruby C Extension working ok, but not this.

Is SUApplicationGetActiveModel working as expected currently? And on Mac?

---

<div class="post-metadata">

**Author:** ![DanRathbun](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/danrathbun/32/500_2.png) [@DanRathbun](https://forums.sketchup.com/u/DanRathbun)\
**Post date:** [November 24, 2025, 11:22pm UTC](https://forums.sketchup.com/t/return-su-error-no-data-when-call-suapplicationgetactivemodel-in-sketchup-2022/320965/3 "2025-11-24T23:22:02Z")

</div>

According to the issue thread (linked in the first post) in the GitHub tracker, Kalpana recreated the bug in SU2025 last June.

The GitHub issue is not closed and I do not see a fix listed in any version release notes since.
