Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

DrawingView.Rotation causing an error

1 REPLY 1
Reply
Message 1 of 2
Anonymous
199 Views, 1 Reply

DrawingView.Rotation causing an error

An iLogic rule that was working fine is now causing an error. The first thing I did was to close everything out and reboot. That didn't fix anything. The part of the code that the rule is getting hung up on is basically this:

Dim detailView As DrawingView = ThisDoc.Document.Sheets(1).DrawingViews(4)
Set detailRotation As Double = IIf((clipWorkPoint.Point.X < 0), (270 * PI / 180) - clipAngle, -((90 * PI / 180) - clipAngle))
detailView.Rotation = detailRotation

 When I run the similar code in VBA it stops on the last line and spits out an error with the message, "Run-time-error '-2147467259 (80004005)':     Method 'Rotation' of object 'DetailDrawingView' failed."

I can manually change the rotation of this view, but the code just breaks.

 

Any help would be appreciated,

Mike

1 REPLY 1
Message 2 of 2
Anonymous
in reply to: Anonymous

Still not sure what happened. I deleted the detail view, created a new one, and modified the code to point to the correct view. After that, everything was back to normal.

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

Post to forums  

Autodesk Design & Make Report