Showing posts with label Civil 3D net programming. Show all posts
Showing posts with label Civil 3D net programming. Show all posts

Wednesday, 9 January 2019

Autocad NET programming : ObjectBrowser documentation error : Selection filters

All the selection methods are documented at the object browser with FilterType as Object. It does not work. FilterType must be declared as Short().
eg SelectionSet.SelectOnScreen(New Short(){0},New Object(){"AECC_PARCEL"})

Monday, 28 August 2017

FeatureLine based Corridor Baseline results to hidden Alignment & Profile exposed through API !!!

I develop a custom Civil 3D plugin to export alignments, profiles and corridor cross sections to LandXML.
I used a dwg with various cases for testing.
There was a case of a Corridor that uses a Feature Line for Baseline.
When getting Alignments and Profiles i found out that Civil 3D creates a hidden Alignment and Profile for this Feature Line !!!
The Profile type although unnamed has an enum value of 5 !!!

Thursday, 16 March 2017

Civil 3D 2017 custom programme, Section views Elevation Minimum set on the fly

Elevation minimum of selected section views can be changed on the fly with this custom programme-plug in, for Civil 3D 2017.

First download the plug in...
https://www.dropbox.com/s/bhpgymcp4herkdq/C3D2017_SectionViewElevMin.dll?dl=0
and save it anywhere you want

Then when in autocad at command line enter NETLOAD and select C3D2017_SectionViewElevMin.dll

At the command line enter setHRZ
enter the new horizon (minimum elevation)
select the desired section views

Finally right click on a section view line and select Update Section View Layout

 

Wednesday, 11 January 2017

AeccContent_Dir, C3DStockSubassemblyScripts.codes and custom coding

When developing custom subassemblies for Civil 3D using MS.NET there might be a need for custom coding.
There are three ways to do it.

1. Rely on module "CodesSpecific.vb" provided from autodesk.
Developer may add custom codes. But none of it will be avalaible unless the file named "C3DStockSubassemblyScripts.codes" is informed with latest codes.
This file is in the directory which variable AeccContent_Dir points to.
This variable is readonly and its initial value is set when installing Civil 3D. If user does not change its location proposed by autodesk then it points to...
C:\ProgramData\Autodesk\C3D 2017\enu\C3DStockSubassemblyScripts.codes

2. A variation of the above approach is to alter the path and/or the name of the file it points to.
Path is get from the variable "AeccContent_Dir" and file "C3DStockSubassemblyScripts.codes" is set into the constCodesFile. Even alter the whole apporoach of getting the codes.

3. Totally ignore the autodesk coding approach and set codes directly which i think is the best approach.




 

Sunday, 12 June 2016

MS Visual Studio NET : Civil 3D and custom references copied local

There is no need for Civil 3D DLL references to be copied local and they should not be.
But other custom DLLs, that are referenced by custom Civil 3D DLL, should be.
Or else when in Civil 3D custom Civil 3D DLL is loaded but no command is executed.
A Line Editor message informs that command is unkonwn !!!

About 64 bit debugging and Edit & continue...

https://cadblognews.com/2016/05/11/debugging-autocad-2017-using-visual-studio-2015/

http://adndevblog.typepad.com/autocad/2016/05/debugging-autocad-2017-using-visual-studio-2015.html?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+AutocadDevblog+%28AutoCAD+DevBlog%29

http://through-the-interface.typepad.com/through_the_interface/2013/11/debugging-autocad-using-visual-studio-2013.html

 

Civil 3D net Corridor Baseline Regions getting Applied Assemblies tip

Each corridor baseline region has its own applied assemblies. One for each corridor section.
I thought that all of them point to the same assembly. So i always used to get only the zero index one.
Each baseline first region zero index applied assembly always exposed the correct assembly.
But i noticed some of the rest were wrong.
I found the reason.
If a region has the same starting station with the previous one ending station (up to 2mm difference) then the first applied assembly, the zero indexed, points to the one of the previous region!!!
So i had to check the items.count of applied assemblies. If more than one then i get the index 1.

Notice : C3D 2012 API did not expose the Region Name. C3D 2016 API does expose it. It was time for the autodesk to do it. So simple.