Run-time error '424': Object required

Run-time error '424': Object required

HoshangMustafa
Advisor Advisor
1,301 Views
11 Replies
Message 1 of 12

Run-time error '424': Object required

HoshangMustafa
Advisor
Advisor

Hi

I tried this code from SDK (attached). I get a compile error. How can I fix it?

0 Likes
1,302 Views
11 Replies
Replies (11)
Message 2 of 12

Stephane.kapetanovic
Mentor
Mentor

hi @HoshangMustafa 

Your code is supposed to work with a dialog box, but the dialog itself is missing, and its code is not included. Additionally, some parts of the initial code are not accepted by the compiler.

Apart from that, the example obtained by copying and pasting from the Getting Started Guide Robot API file works well.

the format imposed by the forum does not allow remote debugging.

Best Regards

Stéphane Kapetanovic

Did you find this post helpful? If it gave you one or more solutions,
don't forget to accept the solution and leave a < like !
EESignature
0 Likes
Message 3 of 12

HoshangMustafa
Advisor
Advisor

Hi @Stephane.kapetanovic 

I tied it this way, but still error at Hwnd line.

 

0 Likes
Message 4 of 12

Stephane.kapetanovic
Mentor
Mentor

hi @HoshangMustafa 

That’s why I mentioned, "... is supposed to work with a 'dialog box' ...", as there was no reference to Form1.

To achieve this, you added the missing class modules, but you would need the original source and the context in which they were used to restore them properly.

Reworking existing code, troubleshooting, and training are not the primary purposes of this forum. The API section is dedicated to free participation in the spirit of community collaboration.

You need to run your code and disable all the lines where this error occurs. Then, I recommend running it again in debug mode with breakpoints while enabling the local variables window. This will allow you to redirect data extractions to a file or a cell range.

Best Regards

Stéphane Kapetanovic

Did you find this post helpful? If it gave you one or more solutions,
don't forget to accept the solution and leave a < like !
EESignature
0 Likes
Message 5 of 12

Stephane.kapetanovic
Mentor
Mentor

hi @HoshangMustafa 

If you're looking for solutions to get started, I recommend reading the tutorials, API documentation, and programming guides.

Other languages exist such as C#, VB.NET, Python, you will be able to adapt your code to your use.

You can find help through the approved solutions on the forum by searching for "API."

Additionally, PDF and HTML files are included with the SDK, located in the installation subdirectory ...\SDK.

You can also access resources such as the API tutorial, instructional videos (12), useful add-ins, and the app store.

Best Regards

Stéphane Kapetanovic

Did you find this post helpful? If it gave you one or more solutions,
don't forget to accept the solution and leave a < like !
EESignature
0 Likes
Message 6 of 12

HoshangMustafa
Advisor
Advisor

Hi @Stephane.kapetanovic 

Please find the attached excel file. I tried modifying the original code so it would retrieve slab required reinforcement area into an excel workbook, but it couldn't do it. Any help would be highly appreciated.

0 Likes
Message 7 of 12

Stephane.kapetanovic
Mentor
Mentor

hi @HoshangMustafa 

Stéphane Kapetanovic

Did you find this post helpful? If it gave you one or more solutions,
don't forget to accept the solution and leave a < like !
EESignature
0 Likes
Message 8 of 12

HoshangMustafa
Advisor
Advisor

Hi @Stephane.kapetanovic 

Thanks. Suppose one modelled the whole structure, defined load cases, combinations, calculated it for forces, brought all panels (floors) into required enforcement for slabs module, calculated required reinforcement for the panels, got Ax-, Ax+, Ay-, Ay+ for all floors. I tried a code to retrieve the required areas of reinforcement into excel workbook without success. Can you help it?

0 Likes
Message 9 of 12

Stephane.kapetanovic
Mentor
Mentor

hi @HoshangMustafa 

I understand that you are looking to match imposed or minimum reinforcement with tabulated results per floor.

There are many examples here on how to work with graphical results (reinforcement maps).

Your program may expand rapidly, quickly reaching several thousand lines of code, including graphical results, overlays, formatting, and more. What you're trying to achieve has likely been done many times by other users and companies.

As I mentioned, the forum is based on voluntary participation.

You need to refine your software architecture and code structure, set clear boundaries, and ask more targeted questions by theme.

Best Regards

Stéphane Kapetanovic

Did you find this post helpful? If it gave you one or more solutions,
don't forget to accept the solution and leave a < like !
EESignature
0 Likes
Message 10 of 12

HoshangMustafa
Advisor
Advisor

Hi @Stephane.kapetanovic 

The first modification for the original code was to retrieve slab required reinforcement area into an excel workbook, i.e., for all reinforcement areas rather than the extreme ones. The second modification would be to retrieve calculated slab required reinforcement area for an already modelled structure. My intention from the beginning of this thread was this second modification since it's easier to model the structure using ARSA rather than using API, and it would be more beneficial to get a tabular form of the required reinforcement area than a graphical view. Any help would be highly appreciated.

0 Likes
Message 11 of 12

HoshangMustafa
Advisor
Advisor

Hi @Stephane.kapetanovic 

Should I engage the RConcrCalcEngine object type in the code rather than using calculation in the slab required reinforcement module?

0 Likes
Message 12 of 12

Stephane.kapetanovic
Mentor
Mentor

hi @HoshangMustafa 

Sorry, I'm currently busy with another task. As for the reinforcement, refer to the documentation, I haven't tried it yet.

you already have the tools you need to extract the reinforcement sections, you just need to add the means of selecting: load case, floor objects, type of results (case by case, envelope, exrreme). I'll come back to the subject when I'm available.

Best Regards

Stéphane Kapetanovic

Did you find this post helpful? If it gave you one or more solutions,
don't forget to accept the solution and leave a < like !
EESignature
0 Likes