Message 1 of 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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
Solved! Go to Solution.