@@ -16,7 +16,7 @@ void PyAcadApplicationImpl::Eval(const CString& csVal) const
16
16
PyThrowBadHr (impObj ()->Eval (bstrVal));
17
17
}
18
18
19
- std::vector<std::wstring> PyAcadApplicationImpl::ListArx ()
19
+ wstringArray PyAcadApplicationImpl::ListArx ()
20
20
{
21
21
VARIANT rtVal;
22
22
VariantInit (&rtVal);
@@ -38,11 +38,83 @@ std::vector<std::wstring> PyAcadApplicationImpl::ListArx()
38
38
return vec;
39
39
}
40
40
41
+ void PyAcadApplicationImpl::LoadArx (const CString& csVal)
42
+ {
43
+ _bstr_t bstrVal{ csVal };
44
+ #if defined(_ZRXTARGET)
45
+ PyThrowBadHr (impObj ()->LoadZrx (bstrVal));
46
+ #elif defined(_GRXTARGET)
47
+ PyThrowBadHr (impObj ()->LoadGrx (bstrVal));
48
+ #else
49
+ PyThrowBadHr (impObj ()->LoadArx (bstrVal));
50
+ #endif
51
+ }
52
+
53
+ void PyAcadApplicationImpl::LoadDVB (const CString& csVal)
54
+ {
55
+ #if defined(_ZRXTARGET)
56
+ throw PyNotimplementedByHost ();
57
+ #else
58
+ _bstr_t bstrVal{ csVal };
59
+ PyThrowBadHr (impObj ()->LoadDVB (bstrVal));
60
+ #endif
61
+ }
62
+
63
+ void PyAcadApplicationImpl::Quit ()
64
+ {
65
+ PyThrowBadHr (impObj ()->Quit ());
66
+ }
67
+
68
+ void PyAcadApplicationImpl::RunMacro (const CString& csVal)
69
+ {
70
+ _bstr_t bstrVal{ csVal };
71
+ PyThrowBadHr (impObj ()->RunMacro (bstrVal));
72
+ }
73
+
74
+ void PyAcadApplicationImpl::UnloadArx (const CString& csVal)
75
+ {
76
+ _bstr_t bstrVal{ csVal };
77
+ #if defined(_ZRXTARGET)
78
+ PyThrowBadHr (impObj ()->UnloadZrx (bstrVal));
79
+ #elif defined(_GRXTARGET)
80
+ PyThrowBadHr (impObj ()->UnloadGrx (bstrVal));
81
+ #else
82
+ PyThrowBadHr (impObj ()->UnloadArx (bstrVal));
83
+ #endif
84
+ }
85
+
86
+ void PyAcadApplicationImpl::UnloadDVB (const CString& csVal)
87
+ {
88
+ #if defined(_ZRXTARGET)
89
+ throw PyNotimplementedByHost ();
90
+ #else
91
+ _bstr_t bstrVal{ csVal };
92
+ PyThrowBadHr (impObj ()->UnloadDVB (bstrVal));
93
+ #endif
94
+ }
95
+
96
+ void PyAcadApplicationImpl::Update ()
97
+ {
98
+ PyThrowBadHr (impObj ()->Update ());
99
+ }
100
+
101
+ void PyAcadApplicationImpl::ZoomAll ()
102
+ {
103
+ PyThrowBadHr (impObj ()->ZoomAll ());
104
+ }
105
+
106
+ void PyAcadApplicationImpl::ZoomCenter (const AcGePoint3d& pnt, double magnify)
107
+ {
108
+ VARIANT rtVal;
109
+ VariantInit (&rtVal);
110
+ InitVariantFromDoubleArray (asDblArray (pnt), 3 , &rtVal);
111
+ PyThrowBadHr (impObj ()->ZoomCenter (rtVal,magnify));
112
+ }
113
+
41
114
bool PyAcadApplicationImpl::runTest ()
42
115
{
43
116
PyAcadApplicationImpl app;
44
- for (const auto & item : app.ListArx ())
45
- acutPrintf (_T (" \n %ls" ), item.c_str ());
117
+ app.ZoomCenter (AcGePoint3d (0 ,0 ,0 ),10 );
46
118
return true ;
47
119
}
48
120
0 commit comments