Friday 30 June 2017

Generating vb.net classes using XSD schemas !!! A miracle ? No ! Just a bummer !

Two freeware solutions for producing Classes from XSD !!!

Microsoft's XSD.exe
Capable of using multiple schemas at one pass but too many errors and arrays instead of lists !!!

My path for the xsd.exe...
C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6 Tools\xsd.exe

In case a schema refers to another eg "HeXML-1_5.xsd" refers to "LandXML-1_2.xsd" the syntax should be as following...

xsd.exe LandXML-1_2.xsd HeXML-1_5.xsd /classes /language:vb

https://stackoverflow.com/questions/35285713/vb-net-create-class-from-xsd-and-generate-xml

https://bembengarifin.wordpress.com/2009/07/14/generate-net-class-from-xsd-with-references-to-other-xsd-using-xsd-exe/


XSD2CODE.exe
Not capable of handling multiple schemas at one pass.
Found at https://xsd2code.codeplex.com/

https://stackoverflow.com/questions/9386754/using-xsd2code-with-multiple-schema-files


Finally there is also another guy that ran into the same problems.
https://stackoverflow.com/questions/35658403/error-deserializing-xml-in-c-sharp

Endless corrections leading to...bummer. Hours lost for nothing. Crapware.

Just, do not bother loosing time with them.



Wish i had time to make my own conversion software.

VB.net How to print an object properties without iterating them by name. Also two ways to get enum value.




Wednesday 14 June 2017

LandXML & Civil 3D tips, clarifications and important matters to remind me while programming

LandXML angular direction :
Unit is always Decimal Degrees
Positive values only, counter clockwise, zero to East

LandXML horizontal alignment elements :
Are set in CoordGeom
Common to Civil 3D are Line, Curve and Spiral (others are Irregular line and Feature ?)

LandXML horizontal alignment element Spiral :
Civil 3D supports only Spiral.SPItype=Clothoid

LandXML horizontal alignment element Curve (Civil 3D Arc) :
Civil 3D supports only crvType=arc

Civil 3D api can be viewed only using Chrome. IE does not show side window elements !?
http://docs.autodesk.com/CIV3D/2018/ENU/API_Reference_Guide/

Civil 3D alignment simple type entities are subentities of more complex ones like SCCS etc.

LandXML theta angle :
is Pi-SpiralIncludedAngle in degrees and is always positive and less than Pi.
Spiral Included Angle is the angle between Short and Long tangents and is always positive and less than Pi.

Friday 2 June 2017

Leica Infrastructure Link - Civil 3D corridor export : failure - Autocad JIT error message "Enumeration has either not started or has already finished"

Searching for a workaround for the previous post i tried exporting the corridor with all baselines checked.
And i got the following message.


More serious bug reports to come...

Leica Infrastructure Link - Civil 3D corridor export : bug - Layer centerline set to wrong baseline alignment

I had a corridor with multiple baselines attached to multiple alignments.
I unchecked all of them except one of them which it was the only one i wanted to export.
I used Leica Infrastructure Link to export it.
Finally i used the MS XML editor to view the exported HeXML file.

The alignment of the checked baseline was not exported.
Instead of it, the alignment of the first (and unchecked) baseline was exported !
The correct feature lines were exported.
Finally the wrong exported alignment was attached to the layer as a centerline.



 

TPS1200 RoadRunner cannot be used for checking tunnel sections

I had a Civil 3D corridor with a tunnel.
I exported it as LandXML file.
I used the Layer check option of RoadRunner.
Unfortunately it only references the cross section vertically. Not perpendicular to it.
It gets the plumb point to the cross section and the ref lines among it are used for further calculations.
I could not find a perpendicular option for the layer check.
I guess this is, among others, a major difference between RoadRunner Road and Tunnel modules.

 
 
 
 

Leica Infrastructure Link - Civil 3D export corridor : failure - Autocad JIT error message "This operation on featureline-based baseline is invalid"

One of the top rated in the wish list about Civil 3D was the option to create a corridor using feature line baseline type. Civil 3D 2017 was the first version to support it.

Leica X-Change no longer exists since this C3D version.
Its successor Leica Infrastructure Link freeware must be used instead.

Running this addon pressing the "Read Civil Objects" button user sees the following message.
The program stucks at this point.



OR

After reading civil objects when trying to save "Export HeXML" user sees the following message

Well at least it is multithreaded. So in either cases user can press Continue and then the OK button and end this addon. But no export takes place.
Same thing happens even if baselines feature line based are unchecked when rebuilding the corridor.
Only solution is to revert to the previous baseline type method of alignment/profile.


Well. It is obvious that Leica developers did not examine the changes between v2016 and v2107.
In v2017 baselines types can differ. Developer should examine if it is "IsFeaturelineBased" or else the above exception is thrown. At least there should exist a user notification.

Leica developers should have seen this link
https://knowledge.autodesk.com/support/autocad-civil-3d/learn-explore/caas/CloudHelp/cloudhelp/2017/ENU/Civil3D-DevGuide/files/GUID-6D41D043-4958-40B7-9C7E-45A6D780955B-htm.html