AutoCAD VBA Programming Tutorial

Поделиться
HTML-код
  • Опубликовано: 13 сен 2024
  • AutoCAD VBA Programming Tutorial. This tutorial shows step by step how to create a program in AutoCAD VBA. In this a program is created to draw rectangle by accepting width & length as input from user. This is a good starting point for those who want to learn AutoCAD VBA.
    #CADCAMTutorials #CADTutorials
    #AutoCADTutorial #AutoCADProgramming

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

  • @chrismarchal3172
    @chrismarchal3172 5 лет назад +2

    Thank you very much for your time and cool video!

  • @NimishP
    @NimishP 7 лет назад +2

    For value of pi, you should use pi = 4*atan(1), where atan is inverse of trigonometric function tan. That way you get most accurate number as calculated by system. Of course, for large programs, it should be initialized once the program is loaded. Also, you can initialize variable like pi_2, 3_pi_2 etc. that represent values of pi/2, 3 pi /2. That way your program will perform better during run time.

  • @BPSJV
    @BPSJV Месяц назад

    Hi. Thank you. this helps me to create my first program. How to add this userform to a custom tool bar?

  • @wojciech765
    @wojciech765 12 лет назад

    For the first step it.s very good introduction Good job and Thanks

  • @hbw4449
    @hbw4449 Год назад +1

    good job

  • @AlexisGolzman
    @AlexisGolzman 11 лет назад

    This is just what I was looking for, thanks for uploading!

  • @roaringleo57
    @roaringleo57 7 лет назад

    Thank you, this worked great even in AutoCAD 2000i

  • @doreidbibak4409
    @doreidbibak4409 Год назад

    Thank you very much, "I want to know how to load a VBA module in AutoCAD 2018."

  • @chandrashekarrao.k1153
    @chandrashekarrao.k1153 11 лет назад

    Thank you so much Sir ...it was excellent for which i was searching...

  • @now6616
    @now6616 5 лет назад

    Wonderful job I hope to learn that I am a newbie.
    Please I need to know an irregular shape drawing
    composed of lines and curves connected together.
    So that the coordinates are entered by form and
    the drawing is on the default drawing

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

    Nice

  • @JulianDelRio1
    @JulianDelRio1 5 лет назад

    Great Video !!!...... Is posible to make an ARRAY using macros ?.... There is some Books o documents about Macros Excel with AutoCAD ?....
    Bye !

  • @CivilSurveyor
    @CivilSurveyor 6 лет назад

    please prepare and create a lisp for road cross sections

  • @FAMCast
    @FAMCast 12 лет назад

    hi thnx for this tutorial.i am a beginner in VBA-CAD. and ur tutorials r goin to help me alot...i have got an issue in running this programme.. i wrote the same code and it is running as well but at the end whn i finish entering x,y points and click GO it gives an error message tht RUN TIME ERROR-(some code)
    NO DATA BASE
    every time any programe i run i get this ,,and debugger locates at line 26 as in ur code window. i need ur help to solve this prblm plz...regards

  • @dennisdevink5667
    @dennisdevink5667 3 года назад +1

    More will be very welcome 🙏

  • @TheAlexisgacia
    @TheAlexisgacia 5 лет назад

    Great video tutorial. Keep it up!

  • @sudhanvamahamuni3191
    @sudhanvamahamuni3191 6 лет назад +2

    Great

  • @CivilSurveyor
    @CivilSurveyor 6 лет назад

    How can we plot a road cross section with lisp command

  • @araki916
    @araki916 11 лет назад

    nice tutorial. I'm getting into VBA for autoCAD. do you have any books or sites?

  • @ederedgolveia4658
    @ederedgolveia4658 4 года назад

    Hi!!
    how to create macros to perform any type of object alignment in the environment?

  • @rishidoshi
    @rishidoshi 11 лет назад

    very good sirji. thanks

  • @InsideMyWall
    @InsideMyWall 3 года назад

    How can I do the quantity takeoff and export it to excel (For brickwork ,tiling etc).

  • @MultiCf4
    @MultiCf4 5 лет назад

    hello ... how to create a login form in Autocad? so when opening auticad you have to login first.

  • @hazelhead3379
    @hazelhead3379 11 лет назад

    Hi - can you do a tutorial on drawing a around that rectangle please?

  • @abdulrehaman100
    @abdulrehaman100 6 лет назад

    use full for create a design program

  • @asifsaudagar
    @asifsaudagar 8 лет назад

    wow. helpful

  • @李義成-y8n
    @李義成-y8n 6 лет назад

    good

  • @daglimilap4516
    @daglimilap4516 4 года назад

    is it possible to make a project that read autocad drawing and make a table with its commands (like line or curve) and starting & ending point and also put some commment in that table ??

  •  7 лет назад

    Hi, i would like to read a text with vba and present it in a textbox in my userform. Can you say me the macro for that?

  • @ni-world642
    @ni-world642 2 года назад

    I have basic knowledge on programming.
    Can any one please tell me how can we make an object on Teklastructures using VBA on AutoCAD....
    Say I want to create a W10x12 beam this way. Is it possible...

  • @howtomakeanovallampshadeha7794
    @howtomakeanovallampshadeha7794 5 лет назад

    Hello. Is it possible to convert the VBA file to a standalone exe cad file?

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

    can you help me VBA

  • @GameReality
    @GameReality 9 лет назад

    How do I create a "ThisDrawing" in solidworks ?
    It is above "UserForm1" on the left .
    I guess that is what is needed in Solidworks to be able to do the same.
    Does anybody know?
    Magnus

  • @neemxyang1739
    @neemxyang1739 7 лет назад

    GOOD

  • @issammahmoud9456
    @issammahmoud9456 8 лет назад

    Is there a course teaching linking Visual 6 Balaotocad

  • @wryahadenadir5901
    @wryahadenadir5901 4 года назад

    Have programming developer course for autocad civil 3D, video or online.

  • @rameshchine2808
    @rameshchine2808 5 лет назад

    HelloI want help regarding VBA program error..After running program the following error display'Compile error- User-define type not defined'

  • @DY-gd4iu
    @DY-gd4iu 5 лет назад

    It doesn't work. error 424 object required. Basically pt2 cannot read the value from pt1

  • @nikolicccc
    @nikolicccc 5 лет назад

    What if I want to define starting point (pt1) in user form. How would I define pt1 coordinates. Can you write me code for that pls?
    Thanx for video.

    • @NimishP
      @NimishP 5 лет назад

      You have to create a button with a caption like Select ... and on the click event of that button write code me.hide.
      Untested.
      I did extensive programming in AutoCAD VBA nearly fifteen years back so I don't recall exactly what was the code, but you can give a try.

  • @bagusdewantoro5583
    @bagusdewantoro5583 6 лет назад

    Hi there..
    Is it possible to change hatch layer via excel input through VBA?
    I have a plaza floor plan with each hatch for each unit (room) to represent unit type. I also have an Excel spreadsheet that contains room number in column A (001, 002, 003,..., etc) and unit type in column B (Small Shop, Food, Hypermarket, Cinema, Department Store, etc).
    Is is possible to update layers in AutoCAD automatically when we change unit type in column B?

    • @CADCAMTutorials
      @CADCAMTutorials  6 лет назад

      It is possible, but you will have to write code for it.

    • @bagusdewantoro5583
      @bagusdewantoro5583 6 лет назад

      CAD CAM Tutorials do you also offer short online course? Because I don't know where to start, just collecting syntax for similar case or learn one by one from the basic.

  • @OutofOffice04
    @OutofOffice04 4 года назад

    hi can you create hatch to that rectangle using vba

  • @timothystreib4226
    @timothystreib4226 10 лет назад

    I have gone over this tutorial multiple times and it keeps giving me a Run-time error '424': Object Required. please tell me why this is? Thank you

  • @issammahmoud9456
    @issammahmoud9456 8 лет назад

    I use Visual 6 and I want to import the block name of Alaotkad Code

  • @abdulrehaman100
    @abdulrehaman100 6 лет назад

    dear sir, I need to create on VBA Program please help me...

  • @GameReality
    @GameReality 9 лет назад

    Hello.
    Can you do this in solidworks for us.
    Thanks.
    Magnus

    • @CADCustomizationMotivation
      @CADCustomizationMotivation 8 лет назад +1

      do u still need help on soliworks customization.i can help

    • @GameReality
      @GameReality 8 лет назад

      +Subir Dutta
      Is there a video on youtube when they do the same in Solidworks?

  • @binishtami837
    @binishtami837 5 лет назад

    how to addpolyline instead of line????

    • @NimishP
      @NimishP 5 лет назад

      Instead of line, you need to define a polyline object.
      You should have a length of array equal to number of vertices in polyline times 3 (each one represents X, Y & Z).
      See code below. UNTESTED
      '========================
      Dim plineObj as AcadPolyline
      Dim pt1 as variant
      Dim pt(0 to 11) as Double
      'Calculate value of point
      pt1 = ThisDrawing.Utility.GetPoint(,"Lower left corner: ")
      'Point 1 (Lower left corner)
      pt(0) = pt1(0)
      pt(1) = pt1(1)
      pt(2) = pt1(2)
      'Point 2
      (Lower right corner)
      pt(3) = pt(0) + Val(TextBox1.Text) 'TextBox1 represents Length
      pt(4) = pt(1)
      pt(5) = pt(2)
      'Point 3
      (Upper right corner)
      pt(6) = pt(3)
      pt(7) = pt(4) + Val(textbox2.Text) 'TextBox2 represents Height
      pt(8) = pt(5)
      'Point 4 (Upper left corner)
      pt(9) = pt(0)
      pt(10) = pt(1) + Val(textbox2.Text) 'TextBox2 represents Height
      pt(11) = pt(2)
      Set plineObj = Thisdrawing.ModelSpace.AddPolyline(pt)
      plineObj.Closed = True
      Set plineObj.Cloded = True
      '========================
      Good luck with programming and have fun.

  • @chinhnguyenvan8881
    @chinhnguyenvan8881 8 лет назад

    people to ask programmers rectangle 1listbox and 1 textbox and how ?

  • @shamimnoman1889
    @shamimnoman1889 8 лет назад

    how to remove password from VBA file

  • @mikaelakkus
    @mikaelakkus 8 лет назад

    hey please send me study documents..thnx:))