+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Forum Deity
    Using
    Civil 3D 2013
    Join Date
    Dec 2005
    Location
    GEELONG AUSTRALIA
    Posts
    3,798

    Default 2013 VBA not working

    Registered forum members do not see this ad.

    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.

    Code:
    something here thisdrawing.active.viewport "model"
    ThisDrawing.Utility.GetEntity oPoly, snapPt, vbCr & "Select polyline :"
    A man who never made mistakes never made anything

  2. #2
    Forum Deity
    Using
    Civil 3D 2013
    Join Date
    Dec 2005
    Location
    GEELONG AUSTRALIA
    Posts
    3,798

    Default

    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

    Code:
    (vl-vbaload "c:/acadtemp/tryme.dvb")
    (vl-vbarun "tryme")
    A man who never made mistakes never made anything

  3. #3
    Forum Deity
    Using
    Civil 3D 2013
    Join Date
    Dec 2005
    Location
    GEELONG AUSTRALIA
    Posts
    3,798

    Default

    Registered forum members do not see this ad.

    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

    Code:
    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)
    A man who never made mistakes never made anything

Similar Threads

  1. 3ds Max 2013
    By Raudel Solis in forum 3ds Max General
    Replies: 6
    Last Post: 12th Mar 2013, 10:23 pm
  2. AutoCAD 2013 Bug ?!?!?
    By Oppie in forum AutoCAD General
    Replies: 57
    Last Post: 24th Apr 2012, 05:36 pm
  3. Acad 2013
    By RyanAtNelco in forum AutoCAD General
    Replies: 6
    Last Post: 12th Apr 2012, 08:04 pm
  4. Inventor 2013 & Inventor LT 2013 System Requirements
    By jdits7 in forum Autodesk Inventor
    Replies: 0
    Last Post: 6th Apr 2012, 02:48 pm
  5. 3ds Max 2013
    By Raudel Solis in forum 3ds Max General
    Replies: 2
    Last Post: 1st Mar 2012, 11:25 pm

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts