- Видео 136
- Просмотров 202 102
Ahmed Kullab
Великобритания
Добавлен 13 ноя 2021
AI X Engineering
Hello and welcome to my channel! My name is Ahmed, and I am so excited to have you here with me today.
As a civil engineer myself, I am passionate about staying up-to-date on the latest trends and innovations in our field. I believe that digital transformation is essential to the future of civil engineering, and I'm excited to share my knowledge and insights with you.
If you're new here, I'd like to give you a warm welcome and thank you for stopping by. I hope that you'll find value in the content that I create and that you'll enjoy being a part of our community.
On this channel, you can expect to learn about topics like Artificial Intelligence, coding, Geographic Information Systems (GIS), automating workflows, and other cutting-edge technologies that are transforming the way we work. I'll be sharing tips, tutorials, and case studies to help you stay ahead of the curve and make the most of these tools in your own practice.
New content is added weekly or bi-weekly.
Hello and welcome to my channel! My name is Ahmed, and I am so excited to have you here with me today.
As a civil engineer myself, I am passionate about staying up-to-date on the latest trends and innovations in our field. I believe that digital transformation is essential to the future of civil engineering, and I'm excited to share my knowledge and insights with you.
If you're new here, I'd like to give you a warm welcome and thank you for stopping by. I hope that you'll find value in the content that I create and that you'll enjoy being a part of our community.
On this channel, you can expect to learn about topics like Artificial Intelligence, coding, Geographic Information Systems (GIS), automating workflows, and other cutting-edge technologies that are transforming the way we work. I'll be sharing tips, tutorials, and case studies to help you stay ahead of the curve and make the most of these tools in your own practice.
New content is added weekly or bi-weekly.
How to learn Python in 2024
From personal experience discover the quickest way of learning Python in 2024.
#python
#coding
#chatgpt
#python
#coding
#chatgpt
Просмотров: 627
Видео
How can Python do your CAD work?!
Просмотров 6882 месяца назад
Welcome back to the channel! In this video, we're diving into how you can save loads of time by automating repetitive tasks in AutoCAD using Python. We'll explore the power of the pyautocad library to make your drafting life easier. Watch as we go through setting up the environment, installing necessary libraries, and using a practical example to draw circles based on Excel data. Whether you're...
Python automate your outlook!
Просмотров 7044 месяца назад
Ever felt overwhelmed by the never-ending flow of emails in your Outlook inbox? In today's video, as promised, we're diving deep into the magical world of automation to bring order to the chaos! With a sprinkle of Python magic, I'll show you how to seamlessly record your emails into an Excel spreadsheet - a game-changer for email reporting or trend analysis. #python #coding #automation #outlook...
Learn Python to Automate AutoCAD Dimensions
Просмотров 5334 месяца назад
#python #autocad #dimensions #coding #automation
Automation with Python - AutoCAD #hatching#
Просмотров 5005 месяцев назад
How to automate the generation of AutoCAD hatches with Python coding AI can assist you to learn coding, it couldn't be easier. #hatch #autocad #coding #python #automation
Automation with Python - AutoCAD Multileader
Просмотров 2925 месяцев назад
#coding #automation #autocad #python Tips on how to automate with Python - Multileader in AutoCAD. The video contains the following: 00:08 Intro 00:23 Create instance of DXF modelspace 01:10 Create a leader 01:27 Create a line 01:50 Create a multi two leader 02:01 Edit the text of second line 02:14 Edit the text of first line 02:42 Edit connection type 03:05 Change line styling 03:38 Change arr...
Automate with Python - Tips AutoCAD Lines
Просмотров 4795 месяцев назад
Automate with Python - Tips AutoCAD Lines
Automate with Python - AutoCAD data! [//lines\\\\]
Просмотров 4135 месяцев назад
Automate with Python - AutoCAD data! [//lines\\\\]
Learn python for AutoCAD and Excel - Detailed Example
Просмотров 8436 месяцев назад
Learn python for AutoCAD and Excel - Detailed Example
Can Python automate AutoCAD & link with Excel?
Просмотров 6366 месяцев назад
Can Python automate AutoCAD & link with Excel?
Master speaking to #autocad in #python language
Просмотров 2667 месяцев назад
Master speaking to #autocad in #python language
AutoCAD and Excel linked together using Python🐍!
Просмотров 8197 месяцев назад
AutoCAD and Excel linked together using Python🐍!
Master AutoCAD Automation with Python & ChatGPT
Просмотров 5428 месяцев назад
Master AutoCAD Automation with Python & ChatGPT
Python Autocad Labelling 101 ChatGPT
Просмотров 3588 месяцев назад
Python Autocad Labelling 101 ChatGPT
ezdxf task01 automate #autocad work with #python smart layer creation
Просмотров 1,9 тыс.8 месяцев назад
ezdxf task01 automate #autocad work with #python smart layer creation
EP02 ChatGPT Coding with Python and AutoCAD 🚀
Просмотров 53110 месяцев назад
EP02 ChatGPT Coding with Python and AutoCAD 🚀
How to speak with #autocad but using #python #chatgpt
Просмотров 1,8 тыс.10 месяцев назад
How to speak with #autocad but using #python #chatgpt
Python for AutoCAD 03: Automate at LARGE SCALE with ChatGPT and Open AI
Просмотров 94010 месяцев назад
Python for AutoCAD 03: Automate at LARGE SCALE with ChatGPT and Open AI
Python boosts AutoCAD! A step by step Ep2
Просмотров 2,8 тыс.11 месяцев назад
Python boosts AutoCAD! A step by step Ep2
Python boosts AutoCAD! A step by step Ep1
Просмотров 4,4 тыс.11 месяцев назад
Python boosts AutoCAD! A step by step Ep1
How to Automate Tasks with AutoCAD and Python
Просмотров 14 тыс.Год назад
How to Automate Tasks with AutoCAD and Python
Python & ChatGPT AI Automation in AutoCAD: Ironman Example
Просмотров 1,4 тыс.Год назад
Python & ChatGPT AI Automation in AutoCAD: Ironman Example
Automate Any CAD drawing using Python x ChatGPT
Просмотров 6 тыс.Год назад
Automate Any CAD drawing using Python x ChatGPT
Data Mining in Road Asset Management: Unveiling the Future of Transportation
Просмотров 66Год назад
Data Mining in Road Asset Management: Unveiling the Future of Transportation
Automating AutoCAD: Shave Hours Off Your Work with ChatGPT and Lisp
Просмотров 979Год назад
Automating AutoCAD: Shave Hours Off Your Work with ChatGPT and Lisp
x100xx Productivity via Tech Mastery and Embracing Open AI
Просмотров 285Год назад
x100xx Productivity via Tech Mastery and Embracing Open AI
ChatGPT's Gift to AutoCAD Users: Instant Total Length Calculation Lisp Code!
Просмотров 758Год назад
ChatGPT's Gift to AutoCAD Users: Instant Total Length Calculation Lisp Code!
Automating PDF Plotting in AutoCAD with OpenAI's ChatGPT
Просмотров 2 тыс.Год назад
Automating PDF Plotting in AutoCAD with OpenAI's ChatGPT
AutoCAD Automation!! using Python and ChatGPT
Просмотров 13 тыс.Год назад
AutoCAD Automation!! using Python and ChatGPT
Excellent video. Just as this Python library can draw in AutoCAD, can it extract data from the AutoCAD file using Python without using AutoCAD?
Pyautocad works on active drawings. EZDXF library is your choice for extracting the data without using AutoCAD. Next video will be covering the ezdxf library
Can pyautocad be used with QCAD?
pyautocad is specifically designed to interface with AutoCAD, and it relies on AutoCAD's COM interface for automation. Therefore, it cannot be directly used with QCAD, as QCAD does not support the same COM interface that AutoCAD does. I hope it makes sense
ezdxf is another library works with dxf files and therefore it works for any CAD programmes
you can do the same thing using Dynamic blocks as well, I'm talking about this specific task only. Otherwise automation should be used for large scale like view creation, getting technical info of objects etc. etc. using Python. I use FreeCAD because it has in-built Python console. Although I don't know anything about Python at all.🤣
sir i want to learning cad but my brother say firstly u learning python and then cad is this useful for me or not can i do python before cad please help me
Listen to your brother
sir i want to learning cad but my brother say firstly u learning python and then cad is this useful for me or not can i do python before cad please help me
Listen to your brother
Hi there, great content Does it works for AutoCAD 2025?
Yes it does
@@ahmedskullab thanks!
No problems
Subscribed.
@@donnygarnett6543 thank you
Great video!
Thank you, glad you think so
So perfect ❤
Thank you :)
nice production value
Glad you think so!
Thanks a lot!
You are welcome
pyautocad is not updated while long time
That's true, ezdxf has this better advantage. I will cover it in another video.
@@ahmedskullab kindly make a little big automation beyond line , circle, rectangle, layers
Incredibly informative videos. Really enjoy your channel dude.
Thank you 🙏
Sorry the example is not great. Also can do that in any language by creating a script. But anyway, good video.
Ok, thanks
This library can use only autocad or can use with autocad clone softwere ?
If the clone software use COM interface, you need to test it with a simple script to find out.
تطور كبير و مجهود جامد 👌🤍💯 عايز اقولك انت ساعدتني اني اعمل برنامج بيحول ال nc file الي بيخرجها برنامج tekla structure ل dxf file اتمني تعمل فيديوهات اكتر و شرح اكتر models دية هتبقي مفيدة جدا
شكرا 🙏
this library need api right ? i think most of drafter use autocad LT which no api pls advise library which work with autocad LT more
Great question! pyautocad requires an API that's not available in AutoCAD LT, you can use the ezdxf library as an alternative. ezdxf allows you to create and modify DXF files, which you can then open in AutoCAD LT. I plan to do similar content but for ezdxf library.
is this... ai generated? or just a bad tts on a human video?
bad tts 😔, continue to improve, thank you for the comment! AI is used to generate some content though.
How complex can this get, I have something that is very repetitive but has a lot of ins and outs.
Python with the ezdxf library can automate complex and repetitive AutoCAD tasks. One challenge at a time, you will be impressed of the results.
nice video! are you using MicroSoft visual studio? if so how do i get the icons on the left side?
Yes its visual studio, go to menu -> view -> appearance -> Activity Bar Position -> Default
@ahmedskullab thank you very much sir!!
@@ahmedskullab i finally got a chance to change the appearance, but when i select view and scroll down appearance is not listed. this is supposed to be in the View dropdown menu, right? thank you in advance for your help!
Please make video for automatic bar bending schedule. How to make programme in python.
Nice job boss
Thank you!
You are good bro
I have little confusion.If we write python code then how does it connects with the Autocad automatically..?? some additional steps are needed or not ..??If needed then please tell me which way to connect both of them
Its via COM, I am preparing a video to explain how all this work
@@ahmedskullab thanks brother
I need to iterate over objects within a block, does anyone know how?
consider using AutoLISP
@@ahmedskullab consider using LEE-Mac's autolisp library. Also, if it's a dynamic block within a dynamic block, you'd need some fancy ssget/entget function that would separate each blocks. Source: I have my own autocad/autolisp library.
AI help is still needed, it is better to compile the execution of the command and convert it into LISP, without errors
How to read and write on dxf files
the line ezdxf.readfile() is doing it, then I used save as to doc.saveas() to write the work in a new file
Is it also possible to do it with Autodesk civil 3D ? Does pyautocad also works with this software ?
I have not tried it with Civil 3d before! it might work. PyAutoCAD is a Python library designed to interact with AutoCAD via its COM API. to automate tasks in Civil 3D using Python, you might need to explore other Python libraries such as use of .NET API
@@ahmedskullab Yes it works with civil3d, however I believe it only works with autocad objects. So it worn't with pipe networks, surfaces, etc.... I am just getting started but I believe that this is accurate.
Surely you could just load this pyautocad lib into a civil 3d DYNAMO “user” node (can’t remember the correct term for the custom python nodes) and doing it is this way you most likely could automate most of the first manual starting steps shown in the video with the csv import/export nodes in the default dynamo libraries or just selecting the data properties directly in the dynamo script without having to leave civil 3d. Haven’t played around with it too much, and there is way more tuts YT for revit dynamo python node creation but principles are exactly the same.
thank you !!!!!!!!!!
Very nice approch
Pleasure
I am getting error import pandas as pd ModuleNotFoundError: No module named 'pandas' Need Help
Use “pip install pandas” 🐼 in the terminal to install the library pypi.org/project/pandas/
Care to share the script? Thanks
I will do once got the chance to
import pandas as pd import win32com.client from datetime import datetime, timedelta # Connect to Outlook outlook = win32com.client.Dispatch("Outlook.Application").GetNamespace("MAPI") inbox = outlook.GetDefaultFolder(6) # 6 refers to the Inbox # Calculate the date for one week ago last_week = datetime.now() - timedelta(days=7) filter_string = "[ReceivedTime] >= '" + last_week.strftime('%m/%d/%Y') + "'" # Apply filter to get emails from the last week filtered_emails = inbox.Items.Restrict(filter_string) # Extract and store email details, converting ReceivedTime to naive datetime if necessary email_details = [] for email in filtered_emails: sender = email.SenderName received_time = email.ReceivedTime body = email.Body # Convert to naive datetime by removing timezone info if received_time.tzinfo is not None: received_time = received_time.replace(tzinfo=None) email_details.append((sender, received_time, body)) # Create a DataFrame df = pd.DataFrame(email_details, columns=['Sender', 'ReceivedTime', 'Body']) # Export to Excel df.to_excel("emails_from_last_week.xlsx", index=False) print("Exported emails from the last week to Excel.")
Getting error in line no. 13 rpc server unavailable
@@Noboundexpo could you try while outlook app is open?
@@ahmedskullab i did exception occurred 4096, Microsoft’s outlook the property RecievedTime unknown
Merhaba ben autocad le pythonu entegre edemiyorum. Yardimci olursaniz sevinirim.
Merhaba, AutoCAD ile Python’u entegre etme konusunda hangi adımda takıldığınızı öğrenebilir miyim? Böylece daha iyi yardımcı olabilirim.
@@ahmedskullab anconda programını kurdum. Python son versiyonu kurdum. Jüpiter notebook dan kodlama yapıyorum ama autocad de çalışmıyor.
For my research I supposed to develop a python code that making pre-made construction concrete forms in AutoCAD and dynamically change their specifications, as well as placing windows and roofs in the desired location. I am not sure if if it is possible or not. cans you give some advice how can start if it is feasible
For this task, it’s worth to learn the AutoCAD .NET API. It’s a bit more complicated than use of pyautocad but it will make the changes later much easier
Thank you. How to find this code in github or raw code?
here you go: # I want to export the line data including # - coordinates x and y for the start and end of each line. # - layer name # - the length # Export the data to an Excel file. import ezdxf from openpyxl import Workbook import math # Loading the dxf file and return modelspace def load_dxf_file(filepath): doc = ezdxf.readfile(filepath) return doc.modelspace() # Calculate line length function def calculate_length(start, end): # distance formula: length = sqrt((x diff)^2 + (y diff)^2) length = math.sqrt((end.x - start.x)**2 + (end.y - start.y)**2) return length # Define the extract line data function def extract_line_data(msp): line_data = [] for line in msp.query('LINE'): start = line.dxf.start end = line.dxf.end layer = line.dxf.layer length = calculate_length(start, end) line_data.append([ start.x, start.y, end.x, end.y, layer, length ]) return line_data # We have the data stored in line_data how to store in Excel! def create_excel_file(data, output_path): wb = Workbook() ws = wb.active ws.title = "Line Data" ws.append(["Start X", "Start Y", "End x", "End Y", "Layer", "Length"]) for row in data: ws.append(row) wb.save(output_path) # Now we have the following: # A function to load the dxf file # A function to calculate line length # A function to extract line data # A function to store data in Excel dxf_path = r"C:\Users\kulla\OneDrive - University of Bath\Documents\Python\Task12\Drawing1.dxf" excel_path = r"C:\Users\kulla\OneDrive - University of Bath\Documents\Python\Task12\LinesData.xlsx" msp = load_dxf_file(dxf_path) lines_data = extract_line_data(msp) create_excel_file(lines_data, excel_path) print(f"Data exported to {excel_path} successfully.")
Ezdxf can create a new dimstyle for whole project ?
Yessss you can do that, what you need to do a for loop and iterate over each dimension and assign it the new style
Your sample is way too primitive to be useful, try using ChatGPT to generate AutoLisp for anything complicated and it fails more often than not! Unless you understand AutoLisp and can perform the QA the code requires, failure will ALWAYS get in there! It makes a lot of syntactical errors in the code it generates. Once more you instruct ChatGPT to make some kind of change, watch out! It will end up changing something in the code you didn't want changed. It has a long way to go yet, but if you don't know Lisp and you have time to spare...well it's like gambling - sometimes you win and sometimes you don't.
Hi man, thank you for your content. I have a questions: How to change hatch with pyautocad? and Can I select an outline and hatch it?
You can easily do that using the ezdxf library. Pyautocad is much harder when you deal with complex objects like Hatches. eventually you could combine both libraries in your code
Awesome video. I am implementing this auto dimension right away.
Thank you for your comment!
@@ahmedskullab Man, your videos are very significant to me. Thanks to your lectures I can make AutoCAD drawings from my Mac 💻 with no need to having AutoCAD installed. I need only a visor.
I'm wondering if it's way faster than using Autolisp? seeing that autolisp is a built in interpreter.
I think it depends on the way you want to use it. If it’s just automating small elements or operations, auto-lisp could be more favoured. Python for the bigger stuff is more feasible
@@ahmedskullab To create a line, have you test the lisp function (entmake....) vs the Py function? (like making 1000 of them) why this question? Py kind of look like vba. I found vba much slower than the lisp. Still I appreciate your presentation of Py as a new tool to help programming in Autocad.
I am learning and following your series, can you please create a video for a block in autocad to export and automate using excel with co-ordinates.
Absolutely! thank you for your comment!
how did you install the pip install ezdxf. When i install the package, the mleader is stored in ezdxf.enteties folder. Do I have the wrong version?
did you try msp.add_multileader_mtext("Standard")?
Use these lines to check the version import ezdxf print(ezdxf.__version__)
Is it possible to add labels and attributes details to the points? Example can the entries in the ID column be added in the model as labels?
Yes absolutely 💯
One way to do it is to custom a function to add labels then use it in the loop.
الله ينور يا هندسة 👏❤في تطور جامد في شرحك و في طريقة عرضك للفيديوهات مبسط الدنيا خالص و مش سايب حتي مجال ان حد يسأل او يقع منه معلومة
شكرا جزيلا
Hi, great video! One question: where can I find the PyAutoCad documentation? I honstely have a very hard time to find it online. Where do you know all these commands from? Thanks!
True, I had challenges too, I use ChatGPT quite often nowadays. Also searching online. There are some information in pypi and GitHub …
@@ahmedskullab I See... Do you perhaps have a personal selection of commands which you could share?
Hey Ahmed, thank you for doing this video. does the multileader also auto/rotate/align with the (poly)line? and why is there a dxf instance necessary? i would want to use something like this in existing drawings, in which i click on a poly line and puta multileader on it. can i download that script anywhere from you ?
Yes and yes
# Import modules import ezdxf from ezdxf.math import Vec2 from ezdxf.render import mleader from ezdxf.render import ARROWS # Initiate DXF file and access model space doc = ezdxf.new(setup= True) msp = doc.modelspace() # Create a Line msp.add_line((60, 15), (115, 15)) # Build the multileader ml_builder = msp.add_multileader_mtext("Standard") ml_builder.set_content( "1. Line Line2", style="OpenSans", alignment=mleader.TextAlignment.left,) ml_builder.set_connection_types( left=mleader.HorizontalConnection.middle_of_top_line, right=mleader.HorizontalConnection.middle_of_bottom_line ) ml_builder.set_leader_properties( color = 1, #This is the red color index linetype="DASHEDX2", lineweight=70, ) ml_builder.set_arrow_properties(name=ARROWS.closed_blank, size=4.0) ml_builder.add_leader_line(mleader.ConnectionSide.left, [Vec2(60, 15)]) ml_builder.add_leader_line(mleader.ConnectionSide.right, [Vec2(115, 15)]) ml_builder.build(insert=Vec2(85, 40)) # Save the document as a DXF file doc.saveas("Multileader10.dxf")
@@ahmedskullab Thank you for the code Ahmed, but for me this only creates a DXF file with a line and multileader on it. How can i use this so it puts a multileader on my own polylines in my own drawings?
I intend to put a detailed video of these tips, to show how you can create and reuse. you can create a function and call it multileader which can be reusable and easier to apply...
I was curious if there's a way to automate hatching closed polylines. As a civil engineer i spend a lot of time hatching areas to gather quantities for hydro cad input
Sure will do! Did you know you can do this ruclips.net/video/wPQoUkE1BEk/видео.htmlsi=AOmdVXTDabPdK8qT
@@ahmedskullab Good to know!
هلا اخوي فكرة جميلة جدا ، بس انا كنت ابحث عن لغة برمجة تعطي واجهة الاوتكاد بشكل ابسط بحيث ان المستخدم يغير من الاطوال والاشكال والخ ويتم حفظ هذا التغيير ، وبالتالي انا اعرف ايش التغير اللي قام به المستخدم واحفظه بالداتبيس عندي ..هل ممكن هالشي
أهلا وسهلا شكرا للتعليقـ، أكيد من الممكن تعمل واجهة للمستخدم وتعمل برامج خاصة بك، التعمال مع الكود مباشرة فيه ميزة المرونة لذلك افضل التعمال مع الكود مباشرة في البداية للتعلم وللتمكن من عمل التغييرات بسهولةـ لما تصل لمرحلة التغيير في الرسومات قليل ممكن تعمل واجهة ونموذج خاص بك.
Merci pour la vidéo intéressante, j'aimerai savoir comment installer python sur autocad? merci d'avance
Merci pour votre commentaire, veuillez suivre cette vidéo ruclips.net/video/TdZ6XCPt1Do/видео.htmlsi=PWcKCuEKjcBLavEQ
AutoCAD version required for this
Any version, it is saved as a dxf file, in fact, you could specify the version within the code…