Visual Basic Customization

Visual Basic Customization

Reply
Active Contributor
jmacpherson
Posts: 49
Registered: ‎07-20-2006
Message 1 of 8 (426 Views)

Custom Sheet Set Index (VBA) Tool not working in 2012

426 Views, 7 Replies
09-07-2011 06:23 PM

Hi,

 

We have this very cool tool that automatically creates a custom sheet property (IndexNo) and indexes all sheets in the active sheet set. Unfortunately, it doesn't run in 2012 and the guy that wrote the application no longer works for us. I am clueless and was hoping somebody out there might be able to take a quick look and modify it to work in 2012. I'm hoping it won't take much to fix it.

 

If somebody could take on the challenge, I would be most appreciative. (file attached)

 

Thanks,

Jim MacPherson 

Active Contributor
GBGB1360
Posts: 27
Registered: ‎11-27-2009
Message 2 of 8 (388 Views)

Re: Custom Sheet Set Index (VBA) Tool not working in 2012

10-14-2011 05:45 AM in reply to: jmacpherson

Jim,

 

You won't be able to load this into AutoCAD 2012 (or 2010 and later) because the VBA engine has been removed from these  versions of AutoCAD.

You have 2 choices:

(1) Visit http://usa.autodesk.com/adsk/servlet/item?siteID=123112&id=12715668&linkID=9240618 to download the VBA enabler for your vesrion of AutoCAD. This will install VBA fro you. You should be able to run the tool thereafter.

(2) Have the tool migrated to .NET and forget about VBA altogether.

 

Option 1 is obviously the cheaper and quicker one, especially for small modules such as this, but for larger projects, it makes more sense long term to migrate.

 

Hope this helps.

 

Gabriel

www.fig-tech.com

 

Active Contributor
jmacpherson
Posts: 49
Registered: ‎07-20-2006
Message 3 of 8 (379 Views)

Re: Custom Sheet Set Index (VBA) Tool not working in 2012

10-14-2011 07:27 AM in reply to: GBGB1360

Thanks for the reponse Gabriel.

 

We have the VBA enabler installed for 2012, but the app doesn't work in this version. It's running fine in 2010, so something has changed and I'm clueless.

 

I was kind of hoping somebody would look at the code and figure out why it wasn't running, but it was a long shot...oh well

 

Of course, it still baffles me why Autodesk hasn't included a default field and/or tool in the sheet set for automatic indexing of drawings?! Then I wouldn't have to worry about this...

 

Regards,

Jim

Active Contributor
GBGB1360
Posts: 27
Registered: ‎11-27-2009
Message 4 of 8 (370 Views)

Re: Custom Sheet Set Index (VBA) Tool not working in 2012

10-14-2011 11:33 AM in reply to: jmacpherson

Jim,

 

Got some drawings with sheet sets. I might be able to help you look at this sometime.

 

Gabriel

Active Contributor
jmacpherson
Posts: 49
Registered: ‎07-20-2006
Message 5 of 8 (369 Views)

Re: Custom Sheet Set Index (VBA) Tool not working in 2012

10-14-2011 01:43 PM in reply to: jmacpherson

Cheers!

*Expert Elite*
norman.yuan
Posts: 1,050
Registered: ‎04-27-2009
Message 6 of 8 (365 Views)

Re: Custom Sheet Set Index (VBA) Tool not working in 2012

10-14-2011 08:46 PM in reply to: jmacpherson

The VBA tool worked until which version of AutoCAD? 2008/09/10/11? Was is 32-bit AutoCAD? Is you AutoCAD 2012 64-bit version?

 

If the previous version the VBA tool workd was 32bit Acad and you are trying it with 64bit AutoCAD, then I am afraid the tool is not going to work. Because the sheet set manager component is 64-bit and while 64-bit Acad VBA is 32bit. With 64bit Acad, its VBA is 32bit out-process run side-by-side with AutoCAD. Although it looks like the old VBA, but it is not. It is just Autodesk's interim solution for early 64-bit Acad adopters. Depending one how Autodesk implemented the VBA for 64-bit Acad, I suspect that SheetSet Manager would be the one not supported by VBA in 64-bit Acad.

 

Moving from 32bit AutoCAD to 64bit Acad would definitely kill some VBA code, such as yours.

 

BTW, the VBA tool is very simple and can be easily port to .NET code by a knowledgeable programmer

Active Contributor
GBGB1360
Posts: 27
Registered: ‎11-27-2009
Message 7 of 8 (304 Views)

Re: Custom Sheet Set Index (VBA) Tool not working in 2012

03-06-2012 09:15 AM in reply to: jmacpherson

Jim,

 

Sorry I forgot about this. The assembly in the attached ZIP does the work in AutoCAD 2012, 32-bit. Take a look at the included readme.txt as well. Get in touch if there are problems.

 

Cheers

 

Gabriel

Active Contributor
jmacpherson
Posts: 49
Registered: ‎07-20-2006
Message 8 of 8 (297 Views)

Re: Custom Sheet Set Index (VBA) Tool not working in 2012

03-06-2012 06:49 PM in reply to: GBGB1360

Thanks Gabriel. I'll check it out.

 

All the best,

Jim

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!