Community
Civil 3D Customization
Welcome to Autodesk’s AutoCAD Civil 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Civil 3D Customization topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Hint on Error messages

10 REPLIES 10
SOLVED
Reply
Message 1 of 11
ATKRM
470 Views, 10 Replies

Hint on Error messages

ATKRM_0-1716271415701.png

Can you please suggest a way out on this error. 

This error is occurring for a daylight at a particular profile at station zero. What will be the probable solution hints by looking at the error messages. @hippe013 

Please suggest. 

10 REPLIES 10
Message 2 of 11
hippe013
in reply to: ATKRM

You can use the debugger within Visual Studio to view your subassembly's code as it is being applied to a corridor. 

 

Is this your own subassembly that you are writing or one of the stock subassemblies provided in the example code (C3DStockSubassemblies)? 

 

In the Utilities class of the C3DStockSubassemblies solution the is a shared/static sub/void RecordError, are you utilizing that? If so, that might be a good spot to set a break point for when you debug your code. 

 

Another suggestion... Post Your Code!

 

Without seeing your code, it is only a guess as to what might be causing the error. I'd like to help but, but I need to see the code in order to do so.

Message 3 of 11
idoQEYMP
in reply to: hippe013


@hippe013 wrote:

You can use the debugger within Visual Studio to view your subassembly's code as it is being applied to a corridor. 

 


How can I do that?

Message 4 of 11
hippe013
in reply to: idoQEYMP

@idoQEYMP 

 

How familiar are you with Visual Studio? Have you debugged with AutoCAD before? The reason I ask is that my response below assumes some familiarity with debugging AutoCAD code with Visual Studio.  

 

Debugging for a subassembly code is similar to debugging any other solution for AutoCAD (Civil 3D). 

After building your solution you start your debugging session how you normally would, but with a subassembly you will want to reload the subassembly into your drawing and apply it to your corridor prior to rebuilding your corridor. Rebuilding your corridor with the subassembly applied will then run through the code you wrote for the subassembly. 

 

Make sure that the subassembly that you have created is pointing to your .NET Assembly (DLL) file. 

hippe013_0-1716391631114.png

The above image shows a stock assembly and the path to the DLL that it is pointing to. Your subassembly should be pathed to your own DLL file.

 

In order to this you will need to have an understanding of writing code for subassemblies (See example code in the supplied C3DStockSubassemblies Solution). You will need to have an understanding of creating .PKT files with all of the necessary files required in the .PKT file, as well as, have an understanding of loading and unloading subassemblies from the Subassemblies Tool Palette.

 

Debugging subassemblies gave me a much more in-depth understanding of how subassemblies work. It's worth the effort to learn how. 

Message 5 of 11
idoQEYMP
in reply to: hippe013

This makes sense. I didn't think of compiling the dll to the imported tools folder nor that I could debug that way because of the whole pkt thing. I usually leave myself "debugging messages" through the editor containing calculated values which is painstakingly slow and frustrating at times. Thank you for the idea I'll give it a try, and apologies for hijacking the thread with my follow-up question.

 

edit: I got it working. This will save me so much time in the future. thanks for the tip @hippe013 !

Message 6 of 11
hippe013
in reply to: ATKRM

@ATKRM Were you able to figure out where your errors were coming from? 

Message 7 of 11
ATKRM
in reply to: ATKRM

@hippe013 , Thanks for asking. I am going through it. I am still in the process .Will confirm, once get the solution. I think it is some geometrical error which result in collapsing the geometry which is causing that error.

Message 8 of 11
ATKRM
in reply to: hippe013

This a new subassembly, not from Stock3d.

Message 9 of 11
ATKRM
in reply to: hippe013

ATKRM_0-1716992330991.png

I am attaching the daylight with the Cover. In the highlighted portion I am getting the error.

Message 10 of 11
hippe013
in reply to: ATKRM

"An applied assembly is an instance of an assembly template attached to a specific station along a corridor."

 

It doesn't seem to make sense to access the applied assemblies during the build process of the corridor. They are the computed assemblies that are attached as a result of the build. 

 

I use the applied assembly collection to get the individual sections of an existing corridor. You can think of the applied assemblies as the RESULT of the corridor build, so trying to access them during the build doesn't make sense. 

 

For example: You have a subassembly representing a 12-foot-wide lane. In your corridor you add a widening target featureline that stretches the lane from 12 feet to 24 feet and your corridor inserts sections along the way that stretch from 12 to 24 feet. You would use the applied assemblies you access those sections. I hope that I am clarifying this enough and not making it more confusing. 

 

hippe013_0-1717003139641.png

 

 

If you could show a little more of your code, or at least explain in detail what you are trying to achieve, I think we can get to a solution. 

Message 11 of 11
ATKRM
in reply to: hippe013

Yes I commented the code of applies subassemblies, it is giving me the desired output.

Thank you for the help.

If any testing errors come , will get back on this.

Thank you. 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


 

Autodesk Design & Make Report