2013-05-26 04:03 AM
2013-05-30 02:18 AM
2013-06-02 11:46 PM
2013-06-12 06:11 PM
2013-06-12 06:39 PM
2013-06-12 06:53 PM
Modeler::SightPtr currentSightPtr; GSErrCode err = ACAPI_3D_GetCurrentWindowSight ((void**)¤tSightPtr);Perhaps this is not in the doco because Modeler::SightPtr is undocumented.
2013-06-17 05:08 AM
GSModeler::ModelFuncTable *funcTable = EXPGetModelFunctionTable (); if (funcTable == NULL) return APIERR_CANCEL; GSModeler::Model::SetFuncTable (funcTable); void* currentSightPtr; if (ACAPI_3D_GetCurrentWindowSight (¤tSightPtr) != NoError) return APIERR_CANCEL; GSModeler::Model model; Modeler::Sight* sight = static_cast<Modeler::Sight*> (currentSightPtr); if (EXPGetModel (sight->GetConstMainModelPtr (), sight->GetSunSettings (), &model) != NoError) return APIERR_CANCEL;
2021-08-05 12:41 PM
Modeler::SightPtr currentSightPtr; GSErrCode err = ACAPI_3D_GetCurrentWindowSight ((void**)¤tSightPtr);A Modeler::SightPtr happens to be a GS::SharedPtr<Sight>, which is not the same as a raw Sight* pointer.
void* dummy = nullptr; ACAPI_3D_GetCurrentWindowSight(&dummy); Modeler::SightPtr currentSightPtr((Modeler::Sight*)dummy); // init the shared ptr with the raw pointer ModelerAPI::Model acModel; AttributeReader attrReader; EXPGetModel(currentSightPtr, &acModel, &attrReader);
2021-08-05 04:00 PM
drjustice wrote:You are responding to an 8 year old thread... is your comment really about the AC 17 devkit / API ... or about a more recent version?
I would like to confirm that the code posted by paulk is indeed incorrect.
2021-08-05 04:43 PM
2021-08-05 07:31 PM
drjustice wrote:You could start a new topic in this Developer Forum about this... legacy API / API documentation. Some of the things are ancient...and have more modern wrappers now, but are still there for legacy support (without requiring heavy updates to add-on code), others are newer and more object oriented. Not being a profit center, a full, clean update of the API, data structures and documentation is not likely. Also, because it relies on proprietary code - and access to the actual product code - it is not something that can be made open source / community-driven either.
ike, I don't understand why you have 12 different data structures that do the same thing, in different namespaces, some types that are classes but some that have constructors some that don't, some that use void pointers, some that use templates, some type names that are missing letters, some that you must initialize not with a constructor, but with BNZeroMemory, and that the SDK provides header files that are there for whatever purpose but that we're not allowed to use other than to make things compile, some classes that we are allowed to use but when you call some of their methods you get unresolved externals, and so on...