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: 

Display custom data in tool pallet

6 REPLIES 6
SOLVED
Reply
Message 1 of 7
Scott_FergusonPVMNH
240 Views, 6 Replies

Display custom data in tool pallet

I'm using .net in C3D 2024, can someone let me know the best way to display data in a property pallet?
I am calculating co2 emission totals and I need to attach this calculation to each of the entities in the drawing.
Then when an individual entity is selected I want to be able to see the calculation in a tool pallet.
Do I need a custom pallet, do I create property sets, is there something else I can use?

My app is pretty far along, I iterate through the drawing and retrieve the information I need from the appropriate entities to do the calculations. I also grab the ObjectId to use for populating the calculation back into the entities when the calculations are complete.

As a start to solve this myself, I have attached the calculation results as xdata to each of the entities.

I need help with the last step, with how to display the information in a tool pallet somewhere.

Hopefully this is a common tasks?

6 REPLIES 6
Message 2 of 7
GTVic
in reply to: Scott_FergusonPVMNH

This may help:

https://www.keanw.com/2009/03/exposing-autocads-properties-palette-functionality-to-net---part-2.htm...

 

There is an app for sale in the Autodesk App Store called Properties Palette that does this.

Message 3 of 7
GTVic
in reply to: GTVic

The easiest way to do this might be if all the entities were dynamic blocks, then the environmental data could maybe be a custom dynamic block property. Those would automatically show up in the properties palette.

Message 4 of 7
Message 5 of 7

Besides focusing on how to display the data (creating custom PaletteSet/modeless form), since you are using C3D, you can choose how to "ATTACH" the non-graphic data to the entities so that the data can be displayed by C3D (or other suitable AutoCAD verticals) automatically: you can attach the data as ObjectData (feature from Acad Map, which part of C3D), or PropertyData (feature available for all Acad AEC vertical), or Object Class (feature from Acad Map).  This way, you can focus your effort only on how to organize the data and attach it to entity and C3D automatically displays the data in the Properties window.

 

It would only worth the effort to create your own UI (PaletteSet) if you want the UI to let user do something that the Properties window does not provide.

 

Norman Yuan

Drive CAD With Code

EESignature

Message 6 of 7

I would use property sets for this. Easy to define and use. Better than doing a custom palette as your data will go with the drawing and doesn't require other users to have your code. 

Message 7 of 7

I've looked into Property Sets and they look interesting.

I found your Property Set example code. Thanks so much for posting that! 🙂
https://forums.autodesk.com/t5/civil-3d-customization/property-sets-a-quick-how-to/m-p/12502844

I will give it a go and see how I get on.

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

Post to forums  

Rail Community


 

Autodesk Design & Make Report