ObjectARX and Qt

AutoCAD I/O - 第一篇(简介) 我们在使用AutoCAD的过程中,很多时候需要一些批处理工作,为相关环节提供特定的图纸。通常我们怎么做呢? 1. ObjectARX,.NET插件或其它脚本,在AutoCAD中加载,运行命令,批量处理图纸 2. 独立的exe程序,利用COMAPI启动AutoCAD(不可见),设置计划任务,批量处理图纸。 3. 使用AccoreConsole这种轻量的,快速的环境,执行脚本,处理图纸。 所有 阅读详情

 

ObjectARX and Qt

Anyone know if its possible to use Qt classes in an ObjectARX application?

 

 

in reply to: jamierobertson1

‎12-02-2009 09:20 

 

 

 

Re: ObjectARX and Qt

I was experiencing with QT for last few days. This question already came into my mind. Following are the notes as per my observaion.

1. Linking the ObjectArx libraries with QT libraries. ( As both of the system are using Visual studio 2005 or similar versions, I feel it would not be a problem)
2. After executing a command suppose we have to display a dialog box, This can be done in following ways
a. Check whether QTApplication has started or not. if it is we can post an event by using QApplication::postEvent() or
QApplication::sendEvent().
3. As we have already used the libraries of both QT and ObjectArx, we can mix ObjectArx Code in QT event handling procedures.

Let me check whether we can link both of the Libraries, I will try to run a test application.

But few questions arise on my mind.

Like, Why you want to use QT libraries in your application as you can integrate C# rich user interface libraries with ObjectArx, Simply you have to write a module to link both C++ and C# applications. I know it is a bit tricky but it can be.

Hope the above observation will help you.

Thnaks & Regards
Anirban Talukdar
talukdar.anirban@gmail.com

 

 

 

 

 

 

 

 

 

 

‎12-03-2009 01:31 AM

‎12-03-200901:31 AM

 

Re: ObjectARX and Qt

Thanks for the reply, I was really just wondering if anyone has tried it before, and if so how painful was the experience and whats possible and not possible?

My plan is to use c# for almost all my UI stuff, the only reason I'd like to use Qt is that I already have alot of Qt code like dialogs with QGraphicsViews and lots of calculations in Qt code etc which Im sure would take me forever to re-write in c# (plus I'm pretty new to c#).

I'm currently thinking the simplest way ahead for me is to use c# as much as possible, keep my Qt stuff seperate and only where really neccesary pop up the occasional Qt widget using COM, I shouldnt really have to pass much data between them so it should be relatively easy.

I'm keen to hear how your test goes,

Regards,

Jamie Robertson

Tags (0)

Add tags

 

 

 

Report

0 Likes

Reply

 

 

‎12-03-2009 01:38 AM

‎12-03-200901:38 AM

 

Re: ObjectARX and Qt

I will try to run. By the way if you have any overload of works, I can help you in this regard. I am looking for some works.

Thanks & Regards
Anirban Talukdar

 

 

‎12-03-2009 07:59 PM

‎12-03-200907:59 PM

 

Re: ObjectARX and Qt

Hi Robetson

I found a good article on this.

http://qtnode.net/wiki/Qt4_with_Visual_Studio

Hope it will help you, I will also try to follow it on weekends.

Thanks & Regards
Anirban Talukdar

 

 

 

in reply to: jamierobertson1

‎12-04-2009 12:49 AM

‎12-04-200912:49 AM

 

Re: ObjectARX and Qt

Alternatively if your using VS 2008, you can just download the latest version of Qt for VS:



[http://get.qt.nokia.com/qt/source/qt-win-opensource-4.6.0-vs2008.exe] Edited by: jamierobertson1 on Dec 4, 2009 8:50 AM

 

 

 

 

in reply to: jamierobertson1

‎12-07-2009 07:31 AM

‎12-07-200907:31 AM

 

Re: ObjectARX and Qt

Hi,

I work on project (AutoCAD integration) implementing Qt in ARX and it works very well.

Have a look on this article http://qt.nokia.com/products/appdev/add-on-products/catalog/4/Windows/qtwinmigrate. It talks about interactions between MFC <-> Qt.

regards

 

 

‎12-08-2009 05:37 AM

‎12-08-200905:37 AM

 

Re: ObjectARX and Qt

Thanks, for that I'll take a look.

Tags (0)

 

 

 

 

 

‎04-25-2014 07:35 AM

‎04-25-201407:35 AM

 

Re: ObjectARX and Qt

Hello,
i'm trying to integrate Qt in ARX. I have followed the article about migration from mfc to qt. Showing a QMessageBox::about using a QWinWidget succeeds but I do not succeed to show a simple QWidget (analogclock found in qt examples). Could you please give a minimal example of a QWidget shown in a command ?
Regards

 

 

 

 

‎04-28-2014 05:03 AM

‎04-28-201405:03 AM

 

Re: ObjectARX and Qt

I don't understand why you succeed to display a QMessageBox but not a QDialog. Here's a simple example:

QWinWidget ww(adsw_acadMainWnd());
MyDialog dlg(&ww);
ww.showCentered();
dlg.exec();

Over time, I noticed that problems could appear at the objects deletion (due to QObject architecture, i.e. parent-child), so I recommand to use pointer and call delete in the right place and time.

 

Note: If you want to put Qt in palettes, use a QWinWidget too.

 

 

 

‎04-28-2014 05:06 AM

‎04-28-201405:06 AM

 

Re: ObjectARX and Qt

One more thing, assured yourself that you have a valid running QApplication (qApp).

 

 

 

 

 

‎04-28-2014 05:25 AM

‎04-28-201405:25 AM

 

Re: ObjectARX and Qt

Thank you very much, I think my problem came from the line dlg.exec(); I didn't know on which instance to call exec(). 

Where do you instantiate the QApplication? in the DllMain ? Do you call exec() on it or only on the QDialog 

 

 

 

 

‎04-28-2014 05:33 AM

‎04-28-201405:33 AM

 

Re: ObjectARX and Qt

I chose to initialize QApplication in On_kInitAppMsg and to destroy it (quit) in On_kUnloadAppMsg.

I use Qt for years, and it seems this is a good solution.

Regards,

 

 

 

 

‎12-10-2014 04:12 AM

‎12-10-201404:12 AM

 

Re: ObjectARX and Qt

Hi maisoui,

 

I followed your guides, qtwinmigrate and applied to ObjectARX 2015.

 

Succeeded to build ObjectARX MFC sample, "dynamic_dg", today.

But as you said, I encountered Runtime Error message, "...QWidget Must construct a QApplication before a QWidget".

 

Can you help me snippet code about QApplication?

Is it right place below initApp() or where?

Thanks in advance.

 

---------------

extern "C" AcRx::AppRetCode acrxEntryPoint( AcRx::AppMsgCode msg, void* pkt)
{
    switch( msg )
    {
    case AcRx::kInitAppMsg:
        acrxUnlockApplication(pkt);
        acrxRegisterAppMDIAware(pkt);
        initApp();

        break;
    case AcRx::kUnloadAppMsg:
        unloadApp();
        break;
    default:
        break;
    }
    return AcRx::kRetOK;
}

 

 

 

 

 

 

 

 

Re: ObjectARX and Qt

Hi,

 

Yes, in your initApp you need to allocate a QApplication. You can use QtWinMigrate to create a QMfcApplication or do by yourself :

int argc = 0;
(void)new QApplication(argc, NULL);

 

From my my experience, I can say:

  • You don't need to configure a Windows Hook (using SetWindowsHookEx)
  • Maybe you need to call qApp->processEvents(); just after allocating the QApplication to correctly "initialize" in the events loop

Don't forget to delete your QApplication in your "unload app".

 

 

 

 

 

 

 

 

‎12-10-2014 06:28 AM

‎12-10-201406:28 AM

 

Re: ObjectARX and Qt

Thank you, Jonathan.

 

Another question I have.

After QApplication added to initApp(), I could not solve error, Qt's Windows Platform loading error, like attachements capture.

 

"This application failed to start because it could not find or load the Qt platform plugin "windows".

Available platform plugins are: minimal, offscreen, windows.

Reinstalling the application may fix this problem."

 

I know about the message, so I did copy them all to my arx folder(--; and autocad folder)

(C:\Qt\5.2.1\msvc2012_64\plugins\platforms\*.dll)

 

Jonathan, you could save me. Thanks a lot.

 

 

 

‎12-10-2014 07:16 AM

‎12-10-201407:16 AM

 

Re: ObjectARX and Qt


I'm progressing some test scenarios. After that, I'll post my result.
Regards,

 

 

 

‎12-11-2014 12:17 AM

‎12-11-201412:17 AM

 

Re: ObjectARX and Qt

Yes, you're right. For each OS Qt5 needs to load a specific plugin. For Windows, it's qwindow[d].dll. It's like other Qt plugins, subfolders must be in an accessible path. When you debug, you can simply use : PATH="$(QTDIR)\bin;$(PATH)" (if you have Qt VS addin installed).

 

 

 

 

‎12-16-2014 10:49 PM

‎12-16-201410:49 PM

 

Re: ObjectARX and Qt

Hi, Jonathan ...

 

I tested basic Qt(5.2.1_x64) Loading on AutoCAD 2015 Platform until now, and succeeded following QMessageBox, very infant code.^^

Thanks for your helps. I'll develop this to next step application using QWinWidget as you said.

Regards,

Myeong Hwan, Kim

 

 

dynamic.arx => AutoCAD MFC Sample

icudt51.dll
icuin51.dll
icuuc51.dll

libEGL.dll

libGLESv2.dll
Qt5Core.dll
Qt5Gui.dll
Qt5Widgets.dll
qwindows.dll => plugins/platform for windows
 

 

_putenv("QT_QPA_PLATFORM_PLUGIN_PATH=C:/temp"); // Environmental variable 1...
_putenv("PATH=C:/temp;%PATH%"); // Environmental variable 2...
int argc = 0;
(void)new QApplication(argc, NULL);
//qApp->processEvents();
//QMessageBox::critical(0, QObject::tr("Test"), QObject::tr("Critical Messages...")); // OK!
//QMessageBox::about(&win, "About QtMfc", "QtMFC Version 1.0\nCopyright (C) 2014"); // window handle?
QMessageBox::about(0, "About QtMfc", "QtMFC Version 1.0\nCopyright (C) 2014"); //OK!

 

 

 

‎12-19-2014 01:59 AM

‎12-19-201401:59 AM

 

Re: ObjectARX and Qt

Thanks... I could now implement addin code on AutoCAD, more about Revit using Qt's Dialog.
But, struggling on AutoCAD Palette using QWinWidget Class for this weekend.
Can you guide about that? Everything is helpful.
Especially about QWinWidget's constructor code and QApplication Instance.
Thanks a lot.

 

 

基于VS2019+QT的Coin3D三维可视化库的安装预测测试 1、Coin3D介绍 Coin3D是一个基于OpenGL的三维图形库,它源于Open Inventor 2.1api,Coin仍然与之兼容。 如果你不熟悉OpenInventor,它是一个场景图,保留模式,渲染和模型操作,C++类库,最初由SGI设计。它发布后,迅速成为科学界和工程界事实上的三维可视化和可视化仿真软件的标准图形库。Coin3D基于这个库的API,但是在SGI Open Inve... 阅读详情

相关推荐

ObjectARX入门实战:从零开发AutoCAD高性能插件

CAD二次开发是提升设计自动化与效率的关键技术,其核心在于如何与底层图形数据库高效交互。ObjectARX作为AutoCAD最底层的C++ API,通过直接加载DLL到AutoCAD进程,实现了与内核的零距离集成,从而在性能与功能深度上具有不可替代的优势。这种技术架构尤其适用于处理海量图形数据、创建复杂自定义对象以及开发高性能专业插件。在机械、建筑等工程领域,开发者常利用ObjectARX构建参数化构件库、智能标注工具及批量处理系统,以应对严苛的性能需求。本文以实战为导向,通过一个完整的智能编号插件项目,系

weixin_30791095的博客 589

ObjectARX+QT实现获取Auto CAD的实体的DXF数据

ObjectARX+QT实现获取Auto CAD的实体DXF数据并将数据传输到QT界面利用DXF数据实现画图等功能。

m0_61778867的博客 3647

ObjectArxAutocad2018Vs2017Qt59-master.zip

arx QT调用实例 QT5.6.3安装包个辅助程序

QT+ObjectARX 2022

今天怀着无比激动的心情写下这篇文章,因为QT在ARX中使用成功。

sunshinecandy的博客 3320

Windows环境搭建VS2010与Qt4.8.5集成开发环境

我自己写的,而且亲自实践过了,内容很详细,不过如果有不足,请大家多多指教!

objectARX实用指南

objectARX实用指南 cad二次开发好工具

ObjectARX 2012 multiplatform Qt

ObjectARX 2012 multiplatform Qt Post: 3 ; Page: 1 of 11 M1_2R2012-10-01 13:49 Hallo, I am developping for AutoCAD 2012 for MAC with Qt 4.7. For those coming from Mac this is very, very intuitive a...

我的博客 876

汇川机器人与PLC通信-ModbusTCP超详细案例

通过汇川机器人与PLC的ModbusTCP通信项目案例,我们可以了解通讯配置的过程,地址映射的方式,对接信号的转换,运行时序的逻辑等注意事项,帮助我们快速应用到项目中。

weixin_44166380的博客 1万+

objectarx + QT

mfc的界面库真心难用,想转用Qt界面库,但这方面的资料很缺乏,网上也搜不到,哪位能帮忙讲一下操作步骤吗

u012411301的博客 1798

FreeRTOS面试题汇总

如果一个低优先级的任务持有一个信号量,高优先级的任务想要用这个信号量,造成的死锁怎么解决。12.FreeRTOS的多任务之间如何去进行通信的,什么方法,它实现原理是什么。任务间数据传输一共有三种形式,用的最多的是消息队列,其次是全局变量和信号量。简历上写了了解RTOS,问了rtos的问题,用过哪些函数。讲解FreeRtos原理,调度机制,底层原理,代码调用。FreeRTOS,你的三个任务控制,请问你是怎么实现的。freertos中EventBits_t是干啥的?freertos使任务切换的方式有哪些?

weixin_45636780的博客 1万+

芯片热设计实战:从功耗与热阻计算到PCB散热优化

在电子系统设计中,芯片的功耗管理与热设计是确保长期可靠性的核心环节。功耗,特别是静态功耗与动态功耗,是芯片发热的根本来源,其精确计算直接关系到系统的稳定性。热阻则量化了热量从芯片内部传导至环境的阻力,是评估散热能力的关键参数。理解功耗与热阻的相互作用,对于防止芯片因过热而触发热关断、提升系统寿命具有重要技术价值。这一原理广泛应用于汽车电子、工业控制等对可靠性要求极高的领域,例如在驱动继电器、电磁阀等负载时,必须对驱动芯片进行严谨的热评估。本文将以多通道高边开关驱动芯片为例,深入剖析其功耗构成与热阻模型,并结

weixin_34191434的博客 274

ObjectARX二次开发创建自己的静态库,如同objectARX库一样

objectARX二次开发的时候,经常会用到一些重复使用的类,如果类已经足够的好,那么我们可以编译成静态库,加快开发和编译的速度,提高工作效率。 环境vs2010+objectARX2012wizard,以及各种编译器平台,我这里主要是用v90 编译器平台。 下面就开始添加一个win32项目。 在win32应用程序向导中,我们下一步,直接勾选静态库,MFC和预编译头。 ...

aeu9737的博客 344

保姆级教程:用Tasking编译器为英飞凌TC387搭建启动代码(附BMHD配置避坑指南)

本文提供了一份详细的保姆级教程,指导开发者使用Tasking编译器为英飞凌TC387芯片搭建启动代码,并重点解析BMHD配置中的关键参数。文章包含环境准备、工程结构搭建、BMHD配置详解、启动代码流程解析及常见问题解决方案,帮助开发者避免操作失误导致芯片锁死。

weixin_29699433的博客 316

从‘Hello World’到实战:用ObjectARX Wizards在VS2019中快速创建你的第一个CAD插件(AutoCAD 2021)

本文详细介绍了如何使用ObjectARX Wizards在Visual Studio 2019中快速创建AutoCAD 2021插件。从环境配置到代码生成,再到添加自定义功能和调试技巧,为CAD二次开发初学者提供了全面的实战指南,帮助开发者高效入门ObjectARX开发。

weixin_30363509的博客 401

告别重启烦恼:用WSL2让Docker和VMware在Win10上真正共存

本文详细介绍了如何在Windows 10系统上,借助WSL2实现Docker与VMware的真正共存,彻底告别以往需要反复重启切换的烦恼。通过启用Hyper-V兼容模式并进行正确配置,开发者无需重启即可同时高效运行容器和虚拟机,显著提升开发与测试工作流的连续性和效率。

salt9的博客 996

Axure RP9汉化+授权全攻略:从下载到激活一步到位(附最新授权码)

本文提供Axure RP9从下载安装到界面汉化的完整指南,帮助设计师和产品经理快速上手这款原型设计工具。详细讲解了如何安全获取软件、执行汉化操作、理解核心界面布局,并介绍了创建交互原型和生成HTML文件的基础步骤,助力用户高效开展设计工作。

cuda7parallel的博客 1164

cad+objectarx+vs二次开发的准备工作

前言 准备工作虽然说起来不复杂,但是做起来却很繁琐。毕竟这里涉及到软件的不同版本,objectarx也并不完美,有着各种安装的BUG,所以实际要完成安装调试是非常耗时间的。 1.各版本的cad、objectarx和visualstdio的对应关系 网上资料很多,还是在这里列出来,方便查询。 ObjectARX开发版本对照表 序号 CA...

l93919861的博客 4029

第1章第11节:创建可容纳多行滚动文字的输入框TextEditor [SwiftUI快速入门到实战]

TextField可以让用户输入单行的文字内容,若想输入多行的文字内容,可以使用能够容纳多行滚动文字的 TextEditor。 定义一个字符串属性,用来存储用户输入的文字内容。接着定义一个布尔属性,用来标识是否弹出警告窗口,以显示用户输入的内容。 TextEditor是由UIKit中的UITextView演变而来,因此可以在init方法中,通过UITextView修改TextEditor的外观属性。 添加一个VStack视图,作为子视图的容器。 创建一个TextEditor,Te..

互动教程网[www.hdjc8.com] 838

记录使用vulkan结合Objectarx开发的过程(一)——Vulkan在Qt中的实现

利用Qt的QWindow类对vulkan的支持,实现vulkan在qt界面上的显示

zxlml的博客 2247

材料仿真软件:Materials Studio_(14).电学性质计算

设置计算参数,包括 k 点网格、交换相关泛函等。

kkchenjj的博客 1875

全球国家地区城市数据

MySQL全球国家地区城市数据报。。。。。。。。。。。。

ObjectArx开发对txt文本文件的操作一例

// MyArxFirst.cpp : 定义 DLL 应用程序的导出函数。 //ObjectArx开发对txt文本文件的操作一例 #include "stdafx.h" #include #include #include #include #include // #include using namespace std; //定义两个函数 void initApp(); v

hsg77的专栏 2804

精雕软件(JDpaint) 5.5 绿色版

精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版

探索Vulkan与ObjectARX的融合开发(一)——Qt窗口与Vulkan渲染的深度集成

本文深入探讨了Vulkan与Qt窗口的深度集成技术,为三维图形开发提供高性能解决方案。文章详细介绍了开发环境搭建、Qt窗口与Vulkan的集成架构设计,以及关键技术的实现细节,特别适合CAD、BIM等专业软件开发。通过Vulkan与Qt的结合,开发者能够实现更高效的图形渲染和UI交互。

weixin_30340819的博客 404

数学建模模型总结

这是本人在两年内准备参加数学建模竞赛搜集到的模型资料,已经经过了本人的筛选和整理,希望能够对准备参加数学建模竞赛的学弟学妹们提供一些帮助!

AutoCAD ObjectARX开发版本对照表

ObjectARX开发版本对照表 序号 CAD版本 版本号 二进制兼容 .net框架 ObjectARX开发环境 VC版本号 MAC OS平台 WINDOWS平台 VC版本 ...

yunyou.ke.qq.com 5617

记录使用vulkan结合Objectarx开发的过程(二)——ViewCube的实现

ViewCube是用于辅助用户快速识别方向以及切换视角,它在绘图软件中常位于窗口的右上角,且能根据鼠标点击后识别Cube的各个部位来调整相应的视角。

zxlml的博客 741

ObjectARX开发总结

1. API他有三种API(这里不讨论API所处层次的问题):c++ API, COM API and .net wrapper API. COM API的存在是因为有些ACAD的东西比如classic menu等,只能用COM来访问。2. 版本a. 每个版本的Autocad对应一个arx版本。保持一定程度的向下兼容,比如AutoCAD2011可以支持用autocad2010 arx编写的app,...

weixin_33908217的博客 150

使用Clion编辑器Qt遇到的坑

cmake_minimum_required(VERSION 3.5) project(glove_sys_cmake LANGUAGES CXX) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14") # qt set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_AUTOUIC ON) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) set(CMAKE_CXX_STANDA

weixin_42312323的博客 915
上一篇: Qt5.11.2 & VS2017 & 64位版本 静态编译
下一篇: qt静态编译
lst0426
博客等级 码龄12年 627粉丝 623原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

lst0426

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值