Search the Community
Showing results for tags 'vba autocad'.
-
Goodday Everyone, I have created a vba code for creating Longitudinal section (inputs from excel), also I want to make a gap between the profiles if a row was empty in excel. Can anyone guide me through this!? Thanks Regards, Vasanth. S
-
Hello, my problem is that when i use the function: Dim z As Double Dim h As Double Dim c4(0 To 2) As Double z = Val(TextBox2.Text) / 2 h = Val(TextBox3.Text) c3(0) = 0#: c3(1) = 0#: c3(2) = 1# radius1 = z height1 = h Set psr = ThisDrawing.ModelSpace.AddCylinder(c3, radius1, height1) then I draw a cilinder on both sides, I would ask for help in drawing it on one side.
-
Good Day, I would like to request an accessible files of autocad vba (userform/macro/.dvb/.frm). What I am trying to achieve is a toolbar that allows me to compute values and arrange it in a table per layers. Any files could do, related or not, finished or not, i'll try to get some ideas/codes/formats how its made, still learning some codes. As for example.. I draw many lines,polylines, area/region, volume on autocad with different LAYER name each. then i'll just drag select all the objects I want to compute, then give me result of the TOTAL LENGTH, TOTAL AREA, TOTAL VOLUME, TOTAL COUNT(separated function) showed in TABLE/listbox per LAYER, then later on i'll try to send it to EXCEL. LAYER | Length/Area/Volume/Count | UNITS Line1 | 100 | meters Liner2 | 100 | meters Area3 | 100 | sq.meters Volume4 | 100 | cu.meters Count5 | 100 | pieces I hope you guys could share some files/sites, I found some, but it has password and cannot preview the code. Thanks
-
Hi guys, Long time ago ,I have written this lisp routine, This routine inputs a reference points coordinates, elevation and distance values from screen. It calculates several new points elevation and distance values and writes their elevation and distance values on screen. Can anyone help me compiling this routine in to vba code (defun C:x() ;We define the reference point (command "osnap" "int") (setq prop (getpoint "Define the reference point:")) (setq propx (car prop)) (setq propy (cadr prop)) (setq n 100) ;We define the reference point elevation (setq ropkot1 (entget (setq ropkot (car (entsel "\n Define the reference point elevation:"))))) (setq ropkot2 (cdr (assoc 1 ropkot1))) (setq ropkoti (atof ropkot2)) ;We define the reference point distance (setq ropmes1 (entget (setq ropmes (car (entsel "\n Define the reference point distance:"))))) (setq ropmes2 (cdr (assoc 1 ropmes1))) (setq ropmesi (atof ropmes2)) ;We pick up the new point (repeat n (command "osnap" "end") (setq p1 (getpoint "Define new point:")) (setq p1x (car p1)) (setq p1y (cadr p1)) (command "osnap" "none") (command "color" "white") (command "line" (list p1x p1y) (list (+ p1x 1.575) (+ p1y 2.1)) "") (command "line" (list (+ p1x 1.575) (+ p1y 2.1)) (list (- p1x 1.575) (+ p1y 2.1)) "") (command "line" (list (- p1x 1.575) (+ p1y 2.1)) (list p1x p1y) "") (setq m1 (- p1x propx)) (if ( (setq kot (+ ropkoti (/ (- p1y propy ) 10))) (command "text" (list (- p1x 3.0) (+ p1y 2.5)) 1.8 0 (rtos kot 2 2)) (command "text" (list (+ p1x 0.75) (- p1y 7)) 1.8 90 (rtos (abs mesafe) 2 2)) )
-
Hi, Is there a way to generate rectangles based of the information on table. Example: Each row of would table have length, width and name information. CAD should be able to read these values and generate corresponding rectangles on the model space. Thank you, Nixon
- 1 reply
-
- vba autocad
- programming
-
(and 2 more)
Tagged with:
-
Hi All, I have an AutoCAD VBA program where i'm fetching records from Oracle DB which is having lakhs of records.so when i execute query it takes long time to return the recordset. I would like to show a progress bar to the user during these recordset retrieval time and for the further process. How to show the progress bar in this case? Thanks in Advance
-
hello in autocad block 4 line TXT TXT1 (handle # 3) TXT2 (handle # 2) TXT3 (handle No. 4) TXT4 (handle # 1) When I recuper the string in a combobox it puts me in the order of handle TXT4,2,1,3 I then I want in the order of the line screen TXT1,2,3,4 Thank you for your help ******** Bonjour Dans le bloc autocad 4 lignes de TXT TXT1 (handle N°3) TXT2 (handle N°2) TXT3 (handle N°4) TXT4 (handle N°1) Quand je recupere le string dans une combobox il me le met dans l'ordre du handle =>Ligne 4,2,1,3 alors que je je veux dans l'ordre de l'écran ligne 1,2,3,4 Merci pour votre aide Public Sub LireTxt() Dim objBloc As AcadBlock Dim objEnt As AcadEntity Dim objEntTxT As as AcadText ThisDrawing.Utility.GetEntity objBlocRef, Pt1, "Sélectionnez le bloc à modifier :" Set objBloc = ThisDrawing.Blocks(objBlocRef.Name) For Each objEnt In objBloc If objEnt.ObjectName = "AcDbText" Then ListBoxTxt.AddItem objEntTxT.textString Endif Next End Sub