Ad

Saturday, September 13, 2008

Modifying Incremental Stationing Report

If you want to change the incremental stationing report to show all profile types instead of just the FG profiles you will need to change the code. In this example I'll be revising the vba file. A similar change can be made to the vb.net code that comes with the product, but for that you would need to download Microsoft Visual Studio Express or by the full version.

To start type vbaload and find the Report_ProfileStaInc.dvb in the C:\ProgramData\Autodesk\C3D 2009\enu\Data\Reports\vba\source\ folder (at least in Vista). Next type vbaide to get the vba editor to show up. Open up the code for the form. To do this right click on the ReportForm and choose View Code.

image

Choose FillGrid from the drop down list on the top of the code window.

image

Scroll down to the code that looks like the code below in the picture. In front of the highlighted code in yellow add an ' . This will comment out the code and the program will ignore those lines and not check to make sure the profile is a finish grade profile before adding it to the list of profiles.

image

Now just save the code. You can run the report from the command line using the vbarun command and choosing the ProfileStaInc_RunReport from the list of macros. You can also add the vba to the Toolbox for easy future access. The dialog box will now show all types of profile types.

2 comments:

Eric said...

Hey Chris,
Thanks for the post. Just ran into this issue, and went to update the code for 2014. The 2014 code was created in .NET and not VBA, so they've actually fixed the code to run with any profile now.

Eric said...

Hey Chris,
I just went to update the code in 2014 for incremental profile reports. Since Autodesk switched over to .NET they've actually updated the code to run with all profile types in 2014 without editing anything.
Thanks,

LinkWithin

Blog Widget by LinkWithin