How to speak with

Поделиться
HTML-код
  • Опубликовано: 2 окт 2023
  • Join me in this exhilarating tutorial where we dive into the fascinating world of AutoCAD and explore how to unleash the power of the ezdxf library. With python and the magical combination of chatgpt, we'll unlock the secrets of automating tasks and revolutionize our experience with AutoCAD. Prepare to be amazed as we discover the endless possibilities and create stunning designs with ease. Let's embark on this thrilling journey together! #PythonPower

Комментарии • 22

  • @eriklehman3175
    @eriklehman3175 3 месяца назад

    nice video! are you using MicroSoft visual studio? if so how do i get the icons on the left side?

    • @ahmedskullab
      @ahmedskullab  2 месяца назад +1

      Yes its visual studio, go to menu -> view -> appearance -> Activity Bar Position -> Default

    • @eriklehman3175
      @eriklehman3175 2 месяца назад +1

      @ahmedskullab thank you very much sir!!

    • @eriklehman3175
      @eriklehman3175 2 месяца назад

      @@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!

  • @bhajansjj
    @bhajansjj 9 месяцев назад +1

    Hi. Thanks for the inputs. Is there some way to save dxf files into svg files using ezdxf or any other library?

    • @ahmedskullab
      @ahmedskullab  9 месяцев назад

      Use svgwrite
      pypi.org/project/svgwrite/

    • @ahmedskullab
      @ahmedskullab  9 месяцев назад

      you could use ezdxf library to read the file and svgwrite to create the SVG.

  • @diegou33
    @diegou33 10 месяцев назад +1

    "Hello friend, great video! I have a question about Pyautocad. I need to draw a line using two points, which will be selected within the Autocad drawing. I've read the documentation and there's 'get.selection', but it only works with objects, not points. Do you know how I could solve this? Thank you!"

    • @ahmedskullab
      @ahmedskullab  10 месяцев назад

      Hey there,
      Thank you for your kind words and your question!

    • @ahmedskullab
      @ahmedskullab  10 месяцев назад

      I am having some thoughts how to work around it but need to access my machine to try it first. Currently not having access to my computer! I will let you know. I can imagine how this can be easily managed in the ezdxf library as you could iterate on these points.

    • @ahmedskullab
      @ahmedskullab  10 месяцев назад +1

      Hey sir, resolved using Utility.GetPoint(), see full code below for connecting two points with a line
      import time
      from pyautocad import Autocad, APoint
      # Initialize the connection to AutoCAD
      acad = Autocad()
      time.sleep(3)
      acad.doc.Utility.Prompt("Hello from PyAutoCAD!
      ")
      def get_point_from_user(prompt_text="Select a point: "):
      acad.doc.Utility.Prompt(prompt_text)
      while True:
      try:
      point = acad.doc.Utility.GetPoint()
      return APoint(point)
      except Exception as e:
      if 'Call was rejected by callee' in str(e):
      continue
      else:
      raise
      def draw_line_between_points(point1, point2):
      """
      Draw a line in AutoCAD between two APoint points.
      """
      acad.model.AddLine(point1, point2)
      if __name__ == "__main__":
      # Ask the user to pick two points
      start_point = get_point_from_user("Select the start point: ")
      end_point = get_point_from_user("Select the end point: ")
      # Draw the line
      draw_line_between_points(start_point, end_point)

  • @muhammadarmaghan2907
    @muhammadarmaghan2907 8 месяцев назад +1

    An amazing tutorial. You should be more well known. I would recommend two things for it. First, Title your videos right. Second, Create better thumbnails.

    • @ahmedskullab
      @ahmedskullab  8 месяцев назад

      Thank you for your feedback, yea I am working on it 😅

  • @niranjantamhane3602
    @niranjantamhane3602 6 месяцев назад +1

    bro why I am not getting elements from 2nd quadrant using ezdxf? I have some required elements in 1st quadrant too.

    • @ahmedskullab
      @ahmedskullab  6 месяцев назад

      this is strange, you should be able to! I assume you mean X coordinates are negative, and Y coordinates are positive?

    • @niranjantamhane3602
      @niranjantamhane3602 6 месяцев назад +1

      @@ahmedskullab yes

    • @ahmedskullab
      @ahmedskullab  6 месяцев назад +1

      Thank you@@niranjantamhane3602 If you're not seeing elements from the 2nd quadrant, it could be due to the selection criteria or how the coordinate system is interpreted in the script. Make sure your selection logic includes elements with negative X and positive Y values. Also, check for any transformations that might affect element positions. If you're still stuck, feel free to share a snippet of your code, and I'll do my best to help out!

    • @niranjantamhane3602
      @niranjantamhane3602 6 месяцев назад

      @@ahmedskullab thanks!

  • @niranjantamhane3602
    @niranjantamhane3602 6 месяцев назад +1

    Bro how to use it for dwg file?

    • @ahmedskullab
      @ahmedskullab  6 месяцев назад

      Thank you, there alternative is pyautocad

    • @ahmedskullab
      @ahmedskullab  6 месяцев назад +1

      You could also use both in the same script

    • @niranjantamhane3602
      @niranjantamhane3602 6 месяцев назад

      @@ahmedskullab thanks