| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
If you like this project and want to support its development, please consider making a donation. Your contributions will help us continue to improve and maintain the project.
This is obviously a fork of RevitPythonShell, bringing an IronPython interpreter to Autodesk Autocad, and it would not be possible without the great work of everyone involved with the RPS project. It's still pretty rough around the edges and provides only basic functionality at this time. I'm sharing my work so far, in the hopes that together we can expand it further.
The CADPythonShell (CPS) ,lets you to write plugins for Autocad in Python, provides you with an interactive shell that lets you see the results of your code as you type it. This is great for exploring the Autocad API.
The biggest limitation is that you can't deploy DLLs with custom scripts at this time and you can't subscribe to events at startup time.
IronPython 3.4 uses Python 3.4 syntax and standard libraries and so your Python code will need to be updated accordingly. There are numerous tools and guides available on the web to help porting from Python 2 to 3.
IronPython 3 targets Python 3, including the re-organized standard library, Unicode strings, and all of the other new features.with user upgrade from IronPython 2 to IronPython 3, please follow Upgrade from IronPython 2 to IronPython 3.
Various differences between IronPython and CPython can follow at Differences IronPython and CPython.
Note : Support for 5 last version(2019-2023) Autocad or Civil 3D. Older versions can be used but will not guarantee the expected performance.
Use Snoop In Python Shell In Python Script :
Write Console Sample In Console :
ed = doc.Editor
ed.WriteMessage("Hello")Create Script Execute ShowAlertDialog Demo :
import clr
clr.AddReference('acmgd')
clr.AddReference('acdbmgd')
clr.AddReference('accoremgd')
# Import references from AutoCAD
from Autodesk.AutoCAD.Runtime import *
from Autodesk.AutoCAD.ApplicationServices import *
from Autodesk.AutoCAD.EditorInput import *
from Autodesk.AutoCAD.DatabaseServices import *
from Autodesk.AutoCAD.Geometry import *
doc = Application.DocumentManager.MdiActiveDocument
ed = doc.Editor
db = doc.Database
# Write Code Below
Application.ShowAlertDialog("Hello World!")Create Script Execute ShowAlertDialog Demo :
Note : you can see more example in folder Script Examples
SnoopNEnts - Snoop Entities Nested In CAD or Civil3D
SnoopByHandle - Snoop By Handle In CAD or Civil3D
Learn some python:
Learn about the Autocad API:
This project is licensed under the terms of the MIT License.
Thanks for providing a free All product IDE for this project.
| Back | FazBrowse Home | New Git URL |