VBA
Discuss AutoCAD ActiveX and VBA (Visual Basic for Applications) questions here.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

loft and the ugly sendcommand

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
Anonymous
525 Views, 2 Replies

loft and the ugly sendcommand

hello everyone,

 

i know you should never use sendcommand but its  last chance saloon time.

 

i already have created 2 circles:

 

Set objCircle1 = ThisDrawing.ModelSpace.AddCircle(objLine.startpoint, dblDia1 / 2)

Set objCircle2 = ThisDrawing.ModelSpace.AddCircle(objLine.endpoint, dblDia / 2)

 

now i would like to loft between them, they are not concentric else i would use AddRevolvedSolid.

 

how do i structure the loft command? i guess i need to send the id or handle of these circles

 

so i tried

 

strHandle1 = objCircle1.Handle

strHandle2 = objCircle2.Handle

 

this doesnt work:

 

ThisDrawing.SendCommand "loft" & vbCr &  strHandle1 &  strHandle2 & vbCr & vbCr

 

how do i correctly send objects to the command line?

 

any useful input would be wonderful! thanks

 

2 REPLIES 2
Message 2 of 3
Alfred.NESWADBA
in reply to: Anonymous

Hi,

 

try this with your handles instead of mine from my small sample

   Dim tHandleStr1 As String: tHandleStr1 = "25E"
   Dim tHandleStr2 As String: tHandleStr2 = "25D"
   Call ThisDrawing.SendCommand("_LOFT" & vbCr & "(handent """ & tHandleStr1 & """)" & vbCr & "(handent """ & tHandleStr2 & """)" & vbCr & vbCr & vbCr)

 

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 3 of 3
Anonymous
in reply to: Anonymous

thanks very much, that works fine. the devil is in the details!

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost