我的任务是尝试在我的工作中将vb转换为python。我实际上不必完成它,但试着看看我能不能。我在这里找到了一个很好的资源:http://vb2py.sourceforge.net/docs/dim.html
我只是在学习Python,所以我不是专家,但认为这可能是一项有趣的练习。这是为在ArcGIS中使用而设计的。
Public Property Get PageLayout_NewPolygon() As UID
# from reference : There is also no concept of Public or
# Private class members in Python. Everything is public...
# Original VB Next Line - Commented Out
# Dim u As New UID
# Python Next Line - Reference : http://vb2py.sourceforge.net/docs/dim.html
u = UID()
u = "{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}" # Value Changed.
# Original VB Next Line - Commented Out
# Set PageLayout_NewPolygon = u
# Python Next Line - Reference : http://vb2py.sourceforge.net/docs/set.html
PageLayout_NewPolygon = u
End Property
# I don't think 'End' is needed in Python so this can be removed, right?
原始代码:(防止混淆)。
Public Property Get PageLayout_NewPolygon() As UID
Dim u As New UID
obj = Collection()
u = "{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}" ' Value Changed.
Set PageLayout_NewPolygon = u
End Property
我真的很感激任何建议。