Code Set Style - Classification Code

Code Set Style - Classification Code

DonnyVA
Contributor Contributor
957 Views
7 Replies
Message 1 of 8

Code Set Style - Classification Code

DonnyVA
Contributor
Contributor

Hi All,

 

It seems that the "Classification Code" property for a "Code Set Style" Item is not exposed?

Has anyone found anything about that?

 

I have been searching for a while now and found that all properties, except the Classification Code, are available with .NET API.

I have also looked at .COM or ObjectArx but couldn't find anything.

 

This would be really useful because the "ClassificationCode" shape data can be used in a "Property Set".

The "description" can not be used in a property set so that is not an alternative.

0 Likes
Accepted solutions (1)
958 Views
7 Replies
Replies (7)
Message 2 of 8

Jeff_M
Consultant
Consultant

What am I missing?

6-21-2021.PNG

Jeff_M, also a frequent Swamper
EESignature
0 Likes
Message 3 of 8

DonnyVA
Contributor
Contributor

Mmm strange.

 

I have an Autocad add-in project solution in VS with references to the 2019 ObjectArx. The "Classification" property is missing in there.

 

I needed the Classification Code property in Dynamo so I tried the ".ClassificationCode" property but that did not exist.

 

I googled "Classification" a lot but I did not find anything. Where did you find that?

I looked into the docs folder in the ObjectArx CHM files but got lost a little bit...

Maybe I gave that up to fast

 

EDIT:

I tried the "Classification" property in Dynamo inside Civil 3D 2021

DonnyVA_0-1624290454789.png

I can't find any API reference to the Civil 3D API 2021. The last one I found is 2019

Civil 3D API 2019 

0 Likes
Message 4 of 8

Jeff_M
Consultant
Consultant
Accepted solution

The screenshot I took was in the C3D 2022 API:

https://help.autodesk.com/view/CIV3D/2022/ENU/?guid=2d4d0e3b-a88b-0eb1-3bc8-36ed8af9df03

 

Using the ObjectBrowser in VisualStudio with a C3D 2020 project loaded, I see that the Classification property is not included in that release. So it appears it was added for C3D 2022. 

Jeff_M, also a frequent Swamper
EESignature
0 Likes
Message 5 of 8

DonnyVA
Contributor
Contributor

(I replied to the wrong message)

0 Likes
Message 6 of 8

DonnyVA
Contributor
Contributor
I've installed Civil 2022 today and wanted to test this Classification property inside Dynamo.



I'm trying to adapt my Python code inside Dynamo so it works with the new CPython3 but this has been, ...well, one big pain in the ***.

Errors keep popping up, Civil 3D/Dynamo keeps crashing. I've lost track how many times this new Dynamo and Civil 2022 have crashed the last 2 hours... What a complete mess.
0 Likes
Message 7 of 8

hosneyalaa
Advisor
Advisor

For civil 3d dynamo or python script

From here 

https://forum.dynamobim.com/t/createoffsetalignment-python-script-fatal-error/65426/6?u=hosneyalaa
0 Likes
Message 8 of 8

DonnyVA
Contributor
Contributor

It has something to do with the new CPython3 wrapper.

Python code that worked in Civil 3D 2021 and previous versions, now suddenly doesn't work anymore.

 

It doesn't matter what's wrong with the code, I always get the same error:

DonnyVA_0-1624629542114.png

Line 92 is in this case the line with "t.Commit"

DonnyVA_1-1624629676168.png

 

It errors always on the line with "t.Commit()", whatever the real issue is.

This makes it very hard to debug and find out why CPython is not happy with my code.

 

WHEN and IF I succeed in adapting my code and can confirm the "Classification" property works, I'll mark this topic as solved.

 

PS:

I get this error too:

DonnyVA_0-1624630026667.png

 

0 Likes