File tree Expand file tree Collapse file tree 1 file changed +5
-15
lines changed Expand file tree Collapse file tree 1 file changed +5
-15
lines changed Original file line number Diff line number Diff line change @@ -97,10 +97,6 @@ ed.WriteMessage("Hello")
9797
9898``` py
9999import clr
100- import sys
101- sys.path.append(' C:\Program Files (x86)\IronPython 2.7\Lib' )
102- import os
103- import math
104100clr.AddReference(' acmgd' )
105101clr.AddReference(' acdbmgd' )
106102clr.AddReference(' accoremgd' )
@@ -110,17 +106,11 @@ from Autodesk.AutoCAD.ApplicationServices import *
110106from Autodesk.AutoCAD.EditorInput import *
111107from Autodesk.AutoCAD.DatabaseServices import *
112108from Autodesk.AutoCAD.Geometry import *
113- adoc = Application.DocumentManager.MdiActiveDocument
114- ed = adoc.Editor
115- with adoc.LockDocument():
116- with adoc.Database as db:
117- with db.TransactionManager.StartTransaction() as t:
118- bt = t.GetObject(db.BlockTableId, OpenMode.ForWrite)
119- btr = t.GetObject(bt[BlockTableRecord.ModelSpace], OpenMode.ForWrite)
120- for objectid in btr:
121- obj1 = t.GetObject(objectid, OpenMode.ForRead)
122- print (obj1)
123- ed.WriteMessage(" Done" )
109+ doc = Application.DocumentManager.MdiActiveDocument
110+ ed = doc.Editor
111+ db = doc.Database
112+ # Write Code Below
113+ Application.ShowAlertDialog(" Hello World!" )
124114```
125115![ ] ( Images/getobject.png )
126116
You can’t perform that action at this time.
0 commit comments