# Dimension style c3d

**URL:** <https://forum.dynamobim.com/t/dimension-style-c3d/92308>\
**Category:** Civil 3D\
**Tags:** dynamo\
**Created:** [July 29, 2023, 6:54am UTC](https://forum.dynamobim.com/t/dimension-style-c3d/92308 "2023-07-29T06:54:04Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![kina\_86](https://avatars.discourse-cdn.com/v4/letter/k/439d5e/32.png) [@kina\_86](https://forum.dynamobim.com/u/kina_86)\
**Post date:** [July 29, 2023, 6:54am UTC](https://forum.dynamobim.com/t/dimension-style-c3d/92308/1 "2023-07-29T06:54:04Z")

</div>

Hello!  
I want to create an automatic label composed by rotated dimension, but i need to define a new **dimension style**. Its there a way to create one?  
I am also interested in **text style**.

Thank you!

---

<div class="post-metadata">

**Author:** ![patrick.ericson](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/patrick.ericson/32/121411_2.png) [@patrick.ericson](https://forum.dynamobim.com/u/patrick.ericson)\
**Post date:** [July 29, 2023, 11:31am UTC](https://forum.dynamobim.com/t/dimension-style-c3d/92308/2 "2023-07-29T11:31:04Z")

</div>

Well first, what have you tried this far?

> [@How to get help on the Dynamo forums](https://forum.dynamobim.com/t/how-to-get-help-on-the-dynamo-forums/4677):
>
> One of the main goals of the Dynamo community is to help others. One way to do that is by answering your questions. But to get the right answer, you’ll first have to ask your question in the right way. Although people are generally very helpful, there are things you can do to improve your chances of getting good and quick answers. Below you will find some suggestions on how to achieve that. Do not think of these suggestions as rules and especially do not take them as a guarantee of getting an an…

---

<div class="post-metadata">

**Author:** ![kina\_86](https://avatars.discourse-cdn.com/v4/letter/k/439d5e/32.png) [@kina\_86](https://forum.dynamobim.com/u/kina_86)\
**Post date:** [July 29, 2023, 12:17pm UTC](https://forum.dynamobim.com/t/dimension-style-c3d/92308/3 "2023-07-29T12:17:46Z")

</div>

Yes i read that.  
What you don t understand?  
I ask about it is posible to create a node for defining a **dimension style** and a **text style**.(for autocad/c3d)  
I was search on the forum and on the internet, but i didn t find anything.  
I think is a package who has that node, but i don t know where to find that…

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [July 29, 2023, 12:26pm UTC](https://forum.dynamobim.com/t/dimension-style-c3d/92308/4 "2023-07-29T12:26:09Z")

</div>

I haven’t seen a node for it, but I also am not sure one would be required.

Try getting an existing one, and editing it. That will tell us what the possible limits are.

If you have the style already in another source drawing (likely knowing most firms) then you could also try inserting an object from the other drawing and see if the dim style transfers over.

---

<div class="post-metadata">

**Author:** ![patrick.ericson](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/patrick.ericson/32/121411_2.png) [@patrick.ericson](https://forum.dynamobim.com/u/patrick.ericson)\
**Post date:** [July 29, 2023, 12:49pm UTC](https://forum.dynamobim.com/t/dimension-style-c3d/92308/5 "2023-07-29T12:49:23Z")

</div>

Yes, you didn’t wrote anything about that you have searched or tested anything. You only asked the forum if it where possible to create a style for text and dimension.

Well, whatever.

I haven’t seen any node how to create what you ask for but I know that there is a possibility to add text to a leader and a dimension using dynamo

---

<div class="post-metadata">

**Author:** ![hosneyalaa](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/hosneyalaa/32/100865_2.png) [@hosneyalaa](https://forum.dynamobim.com/u/hosneyalaa)\
**Post date:** [July 29, 2023, 2:00pm UTC](https://forum.dynamobim.com/t/dimension-style-c3d/92308/6 "2023-07-29T14:00:35Z")

</div>

> [@kina\_86](#):
>
> create a node for defining a **dimension style**

convert code to python

```auto

DimStyleTable dimStyleTable = (DimStyleTable)acTrans.GetObject(acCurDb.DimStyleTableId, OpenMode.ForWrite);
                DimStyleTableRecord dimStyleTableRecord = null;
                if (dimStyleTable.Has(name) == false)
                {

                    if (dimStyleTable.IsWriteEnabled == false)
                        dimStyleTable.UpgradeOpen();
                    dimStyleTableRecord = new DimStyleTableRecord();
                    dimStyleTableRecord.Name = name;
                    dimStyleTable.Add(dimStyleTableRecord);
                    acTrans.AddNewlyCreatedDBObject(dimStyleTableRecord, true);
                }
                else
                {
                    dimStyleTableRecord = acTrans.GetObject(dimStyleTable[name],
                        OpenMode.ForWrite) as DimStyleTableRecord;
                }

// https://forums.autodesk.com/t5/net/creating-dimension-styles/m-p/3604984

```

---

<div class="post-metadata">

**Author:** ![hosneyalaa](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/hosneyalaa/32/100865_2.png) [@hosneyalaa](https://forum.dynamobim.com/u/hosneyalaa)\
**Post date:** [July 29, 2023, 2:02pm UTC](https://forum.dynamobim.com/t/dimension-style-c3d/92308/7 "2023-07-29T14:02:06Z")

</div>

> [@kina\_86](#):
>
> and a **text style**.

convert code to python

```auto
//https://forums.autodesk.com/t5/net/create-non-existant-text-style/m-p/9185596

Public Function CreateTextStyle(ByVal stylename As String, ByVal filename As String, ByVal bgfilename As String, ByVal textheight As Double, ByRef trans As Transaction) As ObjectId
        Dim id As ObjectId = Nothing
        Dim db As Database = Application.DocumentManager.MdiActiveDocument.Database
        Try
            Dim tst As TextStyleTable = DirectCast(trans.GetObject(db.TextStyleTableId, OpenMode.ForRead, False), TextStyleTable)
            Using ts As New TextStyleTableRecord()
                ts.Name = stylename
                ts.FileName = filename
                If bgfilename <> String.Empty Then
                    ts.BigFontFileName = bgfilename
                End If
                ts.TextSize = textheight
                ts.XScale = 1.0
                tst.UpgradeOpen()
                tst.Add(ts)
                trans.AddNewlyCreatedDBObject(ts, True)
                id = ts.ObjectId
            End Using
        Catch ex As Exception
            MsgBox(Reflection.MethodBase.GetCurrentMethod.Name() + " Exception: " + ex.Message)
        End Try
        Return id
    End Function

```

---

<div class="post-metadata">

**Author:** ![paul.m](https://avatars.discourse-cdn.com/v4/letter/p/c0e974/32.png) [@paul.m](https://forum.dynamobim.com/u/paul.m)\
**Post date:** [July 1, 2025, 2:34pm UTC](https://forum.dynamobim.com/t/dimension-style-c3d/92308/8 "2025-07-01T14:34:26Z")

</div>

Sorry, are there any guides on converting your code to python ? I am familiar with Python, but not with C#

---

<div class="post-metadata">

**Author:** ![AdammReilly](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/adammreilly/32/95902_2.png) [@AdammReilly](https://forum.dynamobim.com/u/AdammReilly)\
**Post date:** [July 2, 2025, 12:27pm UTC](https://forum.dynamobim.com/t/dimension-style-c3d/92308/9 "2025-07-02T12:27:31Z")

</div>

> **[Csharp to Python Converter](https://www.codeconvert.ai/csharp-to-python-converter)**
>
> Instantly convert Csharp to Python code with AI. Free, fast, and accurate code translation.

Disclaimer: this link uses AI, be wary of the output.
