乐筑天下

搜索
欢迎各位开发者和用户入驻本平台 尊重版权,从我做起,拒绝盗版,拒绝倒卖 签到、发布资源、邀请好友注册,可以获得银币 请注意保管好自己的密码,避免账户资金被盗
楼主: Shanavas

[编程交流] 使用u获取AutoCAD消息

[复制链接]

114

主题

1万

帖子

1万

银币

中流砥柱

Rank: 25

铜币
543
发表于 2022-7-6 08:31:04 | 显示全部楼层
Many thanks Dadgad - I have also just added two extra tags to the thread: 'autocad', 'virus' to help others find it. I am also considering adding the contents of my above post to the Tutorials section of my site, so that the information can be found and accessed easily.
 
Cheers,
 
Lee
回复

使用道具 举报

44

主题

3166

帖子

2803

银币

中流砥柱

Rank: 25

铜币
557
发表于 2022-7-6 08:33:46 | 显示全部楼层
At Lee's suggestion here, I read through this thread, and thought I'd share that my office recently experienced an Acad.fas / AcadDoc.fas / BakDwg.fas virus.
 
My initial thought as well (once the servers, and computers were cleaned up), was to write a LISP function to 'kill' this virus, but how to ensure that my function is loaded first (before those within the project directories), and my limited testing showed that simply registering a .NET assembly does the trick.
 
Sample command line output at startup:
  1. Loading AEC Base...Loading AEC Base Extended...Loading AEC Base UI...Loading AEC Project Base...Loading AEC Base GUI...Loading AEC Schedule Data...Loading AEC Project UI...Loading AEC Utilities...Customization file loaded successfully. Customization Group: DONTYOUWANTTOKNOWCustomization file loaded successfully. Customization Group: CIVILCustomization file loaded successfully. Customization Group: ACADCustomization file loaded successfully. Customization Group: TOOLBASEDRIBBONCustomization file loaded successfully. Customization Group: TASKBASEDRIBBONCustomization file loaded successfully. Customization Group: AUTODESKSEEKCustomization file loaded successfully. Customization Group: AUTOCADRASTERDESIGNCustomization file loaded successfully. Customization Group: EXPRESSCustomization file loaded successfully. Customization Group: AUTOTURNLoading AECC Base...Initializing....There are no valid MS Jet providers installed......Done.Loading AECC Land...Loading AECC Subentity Selection...Loading Modeler DLLs.Loading AECC Pipe Part...Loading AECC QTO......Loading AECC Pipe Network...Loading AECC Roadway...Loading AECC Survey...Loading AEC Schedule...Loading AECC Plan Production...Loading AEC Architectural Base...Loading AEC Structural Base...Loading AEC Area Base...Loading AEC Dimensions Base...Loading AecCivilBase...Loading AECC Building Site...Loading AECC Point Cloud...Regenerating model.Loading AECC Hydrology...Loading AECC Base UI...Loading AECC Event Viewer...Loading AECC Land UI...Loading AECC QTO UI...Loading AECC Pipe Network UI...Loading AECC Roadway UI...Loading AECC Survey UI...Loading AECC Plan Production UI...Loading AECC Publish UI...Loading AECC AeccUiHydrology...Loading AECC Mapcheck...Loading AECC Mapcheck UI...Loading AECC Building Site UI...Loading AECC Point Cloud UI...Loading AECC Management UI...Loading AECC Model UI...[color=red]** Bow ties are cool **[/color]... Acad.lsp loaded.AutoCAD menu utilities loaded.Regenerating model.... AcadDoc.lsp loaded.AutoCAD menu utilities loaded.... CUIx *.mnl files loadedCommand: _RIBBONCommand: COMMANDLINE
Pseudo code used to test this theory:
  1. using Autodesk.AutoCAD.Runtime;using System;[assembly: ExtensionApplication(typeof(TheDoctorSays.BowTiesAreCool))]namespace TheDoctorSays{   public class BowTiesAreCool : IExtensionApplication   {       void IExtensionApplication.Initialize()       {           Autodesk.AutoCAD.ApplicationServices.Application.               DocumentManager.MdiActiveDocument.Editor.WriteMessage(               "\n** Bow ties are cool ** "               );       }       void IExtensionApplication.Terminate()       {       }   }}
Sample .REG file to register an autoloading .NET assembly:
  1. Windows Registry Editor Version 5.00[HKEY_CURRENT_USER\Software\Autodesk\AutoCAD\[color=red][/color]\Applications\[color=red][/color]]"DESCRIPTION"=[color=red]"Your description"[/color]"LOADCTRLS"=dword:00000002"LOADER"="[color=red][/color]\\[color=red][/color]\\[color=red].dll""MANAGED"=dword:00000001
... More on LOADCTRLS.
 
HTH
回复

使用道具 举报

发表回复

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

QQ|关于我们|小黑屋|乐筑天下 繁体中文

GMT+8, 2025-3-10 04:34 , Processed in 0.720396 second(s), 66 queries .

© 2020-2025 乐筑天下

联系客服 关注微信 帮助中心 下载APP 返回顶部 返回列表