Alignment LabelSet

Hello,

I am using the AlignmentExtensions.CreateAlignmentPlaceholder node in a script, it works fine if i dont give any input on the labelSet input but if i enter a string value that correspond to a labelSet in my drawing then the alignement is not created and i get a nul value. Am I missing something here?


image

Hi can you try with the one called “DRAWING (FR)”?

Same result :

Sorry i forgot the log :slight_smile:
Autodesk.Civil3DToolkit 1.1.14.0
[01/12/2020 17:45:10] ERROR: Alignment labelSet ID is invalid.
Nom du paramètre : alignLabelSetId à Autodesk.Civil.Checker.CheckArgOid(AcDbObjectId oid, String message, String paramName)
à CheckCreateArg(CivilDocument document, String alignmentName, ObjectId siteId, ObjectId layerId, ObjectId styleId, ObjectId labelSetId, AcDbObjectId* alignSiteId, AcDbObjectId* alignLayerId, AcDbObjectId* alignStyleId, AcDbObjectId* alignLabelSetId)
à Autodesk.Civil.DatabaseServices.Alignment.Create(CivilDocument document, String alignmentName, ObjectId siteId, ObjectId layerId, ObjectId styleId, ObjectId labelSetId, AlignmentType type)
à Autodesk.Civil.DynamoNodes.AlignmentExtensions.CreateAlignmentPlaceholder(String name, String site, String layer, String style, String labelSet, Int32 alignmentType) dans D:_Civil3D\Civil3DToolkit\Civil3DToolkit\src\Autodesk.Civil3DToolkit\Civil3DToolkit\Civil3D\AlignmentExtensions.cs:ligne 1575

Thanks, can you use the DocumentExtensions.GetStyle() node?

Hi Paolo,

Here is the result with the DocumentExtension.GetStyle() node.

Thanks, I’m trying to understand why Civil is not happy when you are passing those inputs. In the last log the error was thrown when looking for the style Id. The GetStyle retrieves all the keys in the style dictionaries, there must be something else going on but it is not clear to me at the moment.

Is it because we use the name of the Style as string in the input instead of another Id type?

It must be a string by design

@bertrand.savarit I created two label set styles and tried to replicate a similar workflow but I could not reproduce the error

You’ll find attached a dwg and dyn producing the error here :
Debug axis creation labelset.dyn (15.4 KB)
Debug axis creation labelset.dwg (903.6 KB)