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

No pan or orbit when using Utility.GetEntity in 2015

4 REPLIES 4
Reply
Message 1 of 5
jokiller70
295 Views, 4 Replies

No pan or orbit when using Utility.GetEntity in 2015

Just made a switch to 2015 and 64 bit cod and when i issue .Utility.GetEntity or .Utility.GetPoint i am not able to pan or orbit anymore?

4 REPLIES 4
Message 2 of 5
norman.yuan
in reply to: jokiller70

I can not reproduce it with my AutoCAD 2015. That is, with Utiltity.getEntity()/GetPoint() being called and AutoCAD is hanging for user to pick, I can zoom/pan, the same as all previous versions of AutoCAD

Norman Yuan

Drive CAD With Code

EESignature

Message 3 of 5
jokiller70
in reply to: norman.yuan

64 bit VB app? Mine try to get a point when i pan...

 

Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        Dim picPoint As Object = Nothing
        Dim oCDwg As AutoCAD.AcadDocument
        Dim AcadApp As AutoCAD.AcadApplication

        AcadApp = GetObject(, "AutoCAD.Application")
        If AcadApp Is Nothing Then
            AcadApp = CreateObject("AutoCAD.Application")
        End If
        AcadApp.Visible = True
        AcadApp.WindowState = AutoCAD.AcWindowState.acMax

        oCDwg = AcadApp.ActiveDocument

        picPoint = oCDwg.Utility.GetPoint(, "Välj första punkt: ")

    End Sub

 

Message 4 of 5
norman.yuan
in reply to: jokiller70

It looks like you are doing AutoCAD auotmation from an external EXE app. In this case, it has nothing to do with either AutoCAD or your app being 32 or 64 bit app.

 

Again, it works for me with an WinForm exe app and AutoCAD2015: I can pan/zoom when AutoCAD is waiting for picking a point/an entity:

 

using System;
using System.Windows.Forms;

using AutoCAD;

namespace AcadAutomation
{
    public partial class Form1 : Form
    {
        private AutoCAD.AcadApplication _cadApp = null;
        public Form1()
        {
            InitializeComponent();
        }

        private void StartAutoCAD()
        {
            if (_cadApp==null)
            {
                _cadApp = new AcadApplicationClass();
                
            }

            _cadApp.WindowState = AutoCAD.AcWindowState.acMax;
            _cadApp.Visible = true;

        }

        private void PickPointInAutoCAD()
        {
            AcadDocument dwg = _cadApp.ActiveDocument;
            double[] centre=new double[]{1.0,1.0,0.0};
            dwg.ModelSpace.AddCircle(centre, 5.0);

            try
            {
                dwg.Utility.GetPoint(Type.Missing, "\nSelect a point:");
            }
            catch { }

            try
            {
                object ent;
                Object pt;
                dwg.Utility.GetEntity(out ent, out pt, "\nSelect an entity:");
            }
            catch { }
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            StartAutoCAD();
            PickPointInAutoCAD();
        }
    }
}

 

 

 

Norman Yuan

Drive CAD With Code

EESignature

Message 5 of 5
jokiller70
in reply to: norman.yuan

Tryed on 3 different computers with new 2015 install, same problem. Scroll button gives "invalid point" not pan. Might there be a setting for this? Went back to 2014, works perfectly!

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

Post to forums  

Autodesk Design & Make Report

”Boost