BIGAL Posted June 19, 2012 Share Posted June 19, 2012 I have a VBA program worked fine in 2011 just found out will not work in 2103 a simple fix is required. In 2011 when asking to pick object you just clicked in the model area and then picked object. I am pretty sure I just need a set active viewport statement prior to pick just not sure of the wording. It must be something in the 2013 VBA 64bit runtime. something here thisdrawing.active.viewport "model" ThisDrawing.Utility.GetEntity oPoly, snapPt, vbCr & "Select polyline :" Quote Link to comment Share on other sites More sharing options...
BIGAL Posted June 20, 2012 Author Share Posted June 20, 2012 I loaded the dvb then ran it from command line menu etc as a command it works ok, If I run from VBAMAN it does not work makes debugging a bit harder. 2011 worked fine. My help some one else knowing this (vl-vbaload "c:/acadtemp/tryme.dvb") (vl-vbarun "tryme") Quote Link to comment Share on other sites More sharing options...
BIGAL Posted June 21, 2012 Author Share Posted June 21, 2012 A bit more found I could make changes to the code in VBAMAN but could not use the Run module option had to use the command line to run. the next code snippet may help someone else we need to run the routine in model & paper space so a simple fix If ThisDrawing.ActiveSpace = acModelSpace Then Set Thisspace = ThisDrawing.ModelSpace Else: Set Thisspace = ThisDrawing.PaperSpace End If ' now just change the normal add entity commands Set blkobj = Thisspace.InsertBlock(vertPt, CAR, 1#, 1#, 1#, blkangle) Set arcobj = Thisspace.AddArc(vertPt, cRad, endang, startang) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.