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

rotating region

6 REPLIES 6
Reply
Message 1 of 7
Anonymous
370 Views, 6 Replies

rotating region

Hi I am trying to rotate a region I created but keep getting an error 'object required ' #424. If I extrude the region then I can rotate it. I want to rotate before I extrude. I am fairly new to VBA and would appreciate any help. Thanks Bob Vetrano
6 REPLIES 6
Message 2 of 7
Anonymous
in reply to: Anonymous

usually i get that error if i didnt use the "set" command like set objRegion = however you get the region instead of just objRegion=however you get it hope that helps jm "robert vetrano" wrote in message news:40eb468f$1_3@newsprd01... > Hi > I am trying to rotate a region I created but keep getting an error 'object > required ' #424. If I extrude the region then I can rotate it. I want to > rotate before I extrude. I am fairly new to VBA and would appreciate any > help. > > Thanks > Bob Vetrano > > >
Message 3 of 7
Anonymous
in reply to: Anonymous

John I tried that. I declared the region as variant and when I use Set I get an error type mismatch. thanks Bob v "john m" wrote in message news:40eb4905$1_1@newsprd01... > usually i get that error if i didnt use the "set" command > like > > set objRegion = however you get the region > instead of just > objRegion=however you get it > > hope that helps > > jm > > "robert vetrano" wrote in message > news:40eb468f$1_3@newsprd01... > > Hi > > I am trying to rotate a region I created but keep getting an error 'object > > required ' #424. If I extrude the region then I can rotate it. I want to > > rotate before I extrude. I am fairly new to VBA and would appreciate any > > help. > > > > Thanks > > Bob Vetrano > > > > > > > >
Message 4 of 7
Anonymous
in reply to: Anonymous

my book here has a program to add revolved solid from a rotated region dont know if this is what you are tryin to do but their program does use a variant variable to hold the region in which case you wouldnt use set must just be something about the syntax JM ps the book is called acad2000vba by joe sutphin "robert vetrano" wrote in message news:40eb4ee3$1_1@newsprd01... > John > I tried that. I declared the region as variant and when I use Set I get an > error type mismatch. > > thanks > Bob v > > "john m" wrote in message > news:40eb4905$1_1@newsprd01... > > usually i get that error if i didnt use the "set" command > > like > > > > set objRegion = however you get the region > > instead of just > > objRegion=however you get it > > > > hope that helps > > > > jm > > > > "robert vetrano" wrote in message > > news:40eb468f$1_3@newsprd01... > > > Hi > > > I am trying to rotate a region I created but keep getting an error > 'object > > > required ' #424. If I extrude the region then I can rotate it. I want to > > > rotate before I extrude. I am fairly new to VBA and would appreciate any > > > help. > > > > > > Thanks > > > Bob Vetrano > > > > > > > > > > > > > > >
Message 5 of 7
Anonymous
in reply to: Anonymous

Hi Bob From the VBA Reference: Object.Rotate BasePoint, RotationAngle Object All Drawing Objects, AttributeReference The object or objects this method applies to. (...) Therefore the Rotate method requires an object not a variant: Dim TmpObj As AcadEntity Dim TmpPnt As Variant ThisDrawing.Utility.GetEntity TmpObj, TmpPnt, vbCrLf & "Select Region: " TmpObj.Rotate TmpPnt, 0.7853981 '45 degrees Cheers -- Juerg Menzi MENZI ENGINEERING GmbH, Switzerland http://www.menziengineering.ch
Message 6 of 7
Anonymous
in reply to: Anonymous

I would suggest that, instead of using a variant, you use an object; i.e.: Dim objRegion As AcadObject Set objRegion = ... -- Dan "robert vetrano" wrote in message news:40eb4ee3$1_1@newsprd01... > John > I tried that. I declared the region as variant and when I use Set I get an > error type mismatch. > > thanks > Bob v > > "john m" wrote in message > news:40eb4905$1_1@newsprd01... > > usually i get that error if i didnt use the "set" command > > like > > > > set objRegion = however you get the region > > instead of just > > objRegion=however you get it > > > > hope that helps > > > > jm > > > > "robert vetrano" wrote in message > > news:40eb468f$1_3@newsprd01... > > > Hi > > > I am trying to rotate a region I created but keep getting an error > 'object > > > required ' #424. If I extrude the region then I can rotate it. I want to > > > rotate before I extrude. I am fairly new to VBA and would appreciate any > > > help. > > > > > > Thanks > > > Bob Vetrano > > > > > > > > > > > > > > >
Message 7 of 7
Anonymous
in reply to: Anonymous

Thanks for everyones help. bob Vetrano "robert vetrano" wrote in message news:40eb468f$1_3@newsprd01... > Hi > I am trying to rotate a region I created but keep getting an error 'object > required ' #424. If I extrude the region then I can rotate it. I want to > rotate before I extrude. I am fairly new to VBA and would appreciate any > help. > > Thanks > Bob Vetrano > > >

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

Post to forums  

Autodesk Design & Make Report

”Boost