乐筑天下

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

[编程交流] Upgrading 2009 -2010 - VBA err

[复制链接]

13

主题

126

帖子

114

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
65
发表于 2022-7-6 14:18:48 | 显示全部楼层 |阅读模式
I'm having a strange problem - or at least strange behavior - in migrating from ACAD Electrical 2009 to 2010.
 
When I start 2010, the command window shows the following:
  1. Customization file loaded successfully. Customization Group: ELECTRICALCustomization file loaded successfully. Customization Group: ACADCustomization file loaded successfully. Customization Group: IMPRESSIONCustomization file loaded successfully. Customization Group: AUTODESKSEEKCustomization file loaded successfully. Customization Group: GLENS_CUI_FILECustomization file loaded successfully. Customization Group: EXPRESSRegenerating model.Loading Electrical modules...Loader application completed.AutoCAD menu utilities loaded.AutoCAD Electrical menu utilities loaded.DInfo © by Lee McDonnell Loaded.Type "DINFO" to invoke...Command:Command: *Cancel*Command: *Cancel*Command: opOPTIONSCustomization file loaded successfully. Customization Group: ELECTRICALCustomization file loaded successfully. Customization Group: ACADCustomization file loaded successfully. Customization Group: IMPRESSIONCustomization file loaded successfully. Customization Group: AUTODESKSEEKCustomization file loaded successfully. Customization Group: GLENS_CUI_FILECustomization file loaded successfully. Customization Group: WD2CADCustomization file loaded successfully. Customization Group: EXPRESSCommand:Command:DInfo © by Lee McDonnell Loaded.Type "DINFO" to invoke...; [color=red]error: Automation Error. Problem in loading[/color] [color=red]VBA[/color]AutoCAD Electrical menu utilitiesloaded.Command:DInfo © by Lee McDonnell Loaded.Type "DINFO" to invoke...; [color=red]error: Automation Error. Problem in loading[/color] [color=red]VBA[/color]Command: menubarEnter new value for MENUBAR :Command:MENUBAREnter new value for MENUBAR : 0Command:MENUBAREnter new value for MENUBAR : 1
 
As it loads Lee's DINFO LISP the first time, all looks fine. Then, I type OP to get to the options dialog box and load a profile so that all my menus are where I want them to be. As it loads the menu customizations and reloads DINFO, I get an error loading VBA. (flagged red) (Why it loads it twice is also a good question, I'll check on that next.)
 
Further, the menu bar is not visible at the top of the screen, so i enter MENUBAR in the command window, and AutoCAD reports that it is on (1) so I turn it off, then turn it back on again, and it then shows up.
 
THIS is why I waited 2 months until I got a short break in workload to attempt to upgrade! So far I have 4 hours or so logged installing then repairing and migrating settings.
 
Any thoughts or hints would be appeciated.
回复

使用道具 举报

114

主题

1万

帖子

1万

银币

中流砥柱

Rank: 25

铜币
543
发表于 2022-7-6 14:32:44 | 显示全部楼层
Hi,
 
Firstly, I feel honoured that you are using my DINFO LISP
 
VBA is not supported in the standard release of ACAD 2010. You will need to download an add-on pack.
 
Try typing VBAIDE in 2010, and see what appears
 
Lee
回复

使用道具 举报

13

主题

126

帖子

114

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
65
发表于 2022-7-6 14:36:01 | 显示全部楼层
Ok, I'm downloading and installing the VBA support module, but why does DINFO appear to load properly the first time through?
 
I'm thrilled to have found your program, impressed by your coding ability and awed by your willingness to write code for people who often appear to expect you to do it free and fast.
 
I guess that the switch from VBA to .net is happening sooner that I thought, I guess I'll switch from learing VBA to .net.   gumble grumble grumble.
 
Glen
回复

使用道具 举报

114

主题

1万

帖子

1万

银币

中流砥柱

Rank: 25

铜币
543
发表于 2022-7-6 14:48:54 | 显示全部楼层
 
DINFO runs on LISP which is still supported on 2010
 
 
Thanks - I get enjoyment from writing the programs, and also learn a great deal too.
 
 
Yeah, a lot of the guys here are going that way - a good person to talk to would be SeanT on here. - he's all clued up on the VBA side of things
 
Lee
回复

使用道具 举报

10

主题

973

帖子

909

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
118
发表于 2022-7-6 14:55:02 | 显示全部楼层
 
Hey Lee, thanks for the plug.
 
 
No need to grumble . . . . well, maybe a little.  VB.NET has a bit more of a learning curve but the extended functionality makes many task easier than if they were coded in VBA.
回复

使用道具 举报

13

主题

126

帖子

114

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
65
发表于 2022-7-6 15:06:42 | 显示全部楼层
Another wierd thing I have discovered - once I load my profile, I can no longer get to help. If I hit F1 after starting 2010, I get the standard help screen. I load my profile, then hit F1 again and get a dialog box "Cannot find help file: acad.chm". Perhaps I need to recreate my profile nativly in 2010.
 
It should not be this difficult.
回复

使用道具 举报

114

主题

1万

帖子

1万

银币

中流砥柱

Rank: 25

铜币
543
发表于 2022-7-6 15:10:32 | 显示全部楼层
Same thing here I think:
 
http://www.cadtutor.net/forum/showthread.php?t=36494
回复

使用道具 举报

13

主题

126

帖子

114

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
65
发表于 2022-7-6 15:22:03 | 显示全部楼层
Ok, I checked the thread that Lee pointed me at, and followed the advice there. acad.chm does not exist on my C drive anywhere, but the help directory is/was full of .chm files (including acad180.chm - which I think is the help file for 2010, not acad181.chm) (no dig intended, just fyi).
 
Rather than messing about with trying to re-install help files, I tried getting help before loading my 2009 profile. It worked fine, so I reconfigured my workspace from scratch in 2010 and saved a new profile. Help still works. If I load the 2009 profile, I get the error message - but if I then load the 2010 profile, help works again.
 
I think that there must be something in the 2009 profile that is incompatable with or corrupts the file name or path for 2010's help function. I don't know why it would be changing anything in that area, but that's my story and I'm sticking with it.
 
Hope this helps someone else.
 
Glen
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

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

GMT+8, 2025-3-5 02:57 , Processed in 0.688097 second(s), 68 queries .

© 2020-2025 乐筑天下

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