bug in GripSize via automation

bug in GripSize via automation

daniel_cadext
Advisor Advisor
221 Views
1 Reply
Message 1 of 2

bug in GripSize via automation

daniel_cadext
Advisor
Advisor

 

bug?

(defun C:LDOIT()
    (setq acadObj (vlax-get-acad-object))
    (setq doc (vla-get-ActiveDocument acadObj))
    (setq ACADPref (vla-get-Selection (vla-get-preferences acadObj)))
    (setq originalValue (vla-get-GripSize ACADPref))
    (alert (strcat "The GripSize preference is set to: " (itoa originalValue)))
)

 

bool PyAcadApplicationImpl::runTest()
{
    AcAxDocLock lock;
    CComQIPtr<IAcadApplication> acad(acedGetIDispatch(TRUE));
    if (acad)
    {
        CComQIPtr<IAcadPreferences> prefs;
        if (auto hr = acad->get_Preferences(&prefs); hr != S_OK)
            return false;

        CComQIPtr<IAcadPreferencesSelection> sel;
        if (auto hr = prefs->get_Selection(&sel); hr != S_OK)
            return false;

        long val = 4;
        if (auto hr = sel->get_GripSize(&val); hr != S_OK)
        {
            acutPrintf(_T("\nFail 0x%08x"), hr);
            return false;
        }

        acutPrintf(_T("\nGripSize =  %ld"), val);
    }
    return true;
}
Python for AutoCAD, Python wrappers for ARX https://github.com/CEXT-Dan/PyRx
0 Likes
Accepted solutions (1)
222 Views
1 Reply
Reply (1)
Message 2 of 2

moogalm
Autodesk Support
Autodesk Support
Accepted solution

Thanks we reported this our Engineering team, I can reproduce this in ACAD 2022 too, so I feel this is not a regression in ACAD 2025.

0 Likes