Author Topic: Closed filled arrowhead bug  (Read 439 times)

0 Members and 1 Guest are viewing this topic.

samideqlqpart

  • Newt
  • Posts: 35
Closed filled arrowhead bug
« on: December 25, 2016, 02:31:04 am »
Hello and happy new year
when i ran my program i got this message

eInvalidInput
at
Autodesk.AutoCAD.ApplicationServices.Core.Application.SetSystemVariable(String name, Object value)
at this line
Autodesk.AutoCAD.ApplicationServices.Application.SetSystemVariable("DIMBLK", "_Closedfilled")

but it's happened only with the closed filled arrow and works well with ALL other types of the arrowhead
like  _Dot, _Closedblank,.......

here is the code


                ' Make the arrow head as _Closedfilled.

                Dim mldstyle As New MLeaderStyle()

                Dim blockTable As BlockTable = tr.GetObject(db.BlockTableId, OpenMode.ForRead)
                If (Not blockTable.Has("_Closedfilled")) Then
                    ' load the "_DOT" block definition
                    Autodesk.AutoCAD.ApplicationServices.Application.SetSystemVariable("DIMBLK", "_Closedfilled")
                End If

                mldstyle.ArrowSymbolId = blockTable("_Closedfilled")

How to fix it?
and if the answer is to load it at the begin, then how to do it?
i'm needing helps

thank you






kdub

  • SuperMod
  • Swamp Rat
  • Posts: 994
  • class keyThumper<T>:ILazy<T>
Re: Closed filled arrowhead bug
« Reply #1 on: December 25, 2016, 03:41:34 am »
called Kerry in my other life

Sometimes the question is more important than the answer.

samideqlqpart

  • Newt
  • Posts: 35
Re: Closed filled arrowhead bug
« Reply #2 on: December 25, 2016, 03:51:32 am »
ok  :smitten:

samideqlqpart

  • Newt
  • Posts: 35
Re: Closed filled arrowhead bug
« Reply #3 on: December 27, 2016, 03:03:35 am »
the problem is solved
thank you
is there something about Leader (Qleader)
the same thing
Oblique for arrowhead is chosen by defaults
how to set it to CLosed filled?

kdub

  • SuperMod
  • Swamp Rat
  • Posts: 994
  • class keyThumper<T>:ILazy<T>
Re: Closed filled arrowhead bug
« Reply #4 on: December 27, 2016, 03:54:19 am »
What does this do for you ?
Code: [Select]
Command:
DIMBLK
Enter new value for DIMBLK, or . for default <"">:



and the matching instruction in code
something like :
Code - C#: [Select]
  1.  
  2.            arrowName = (string)AcadApp.GetSystemVariable("DIMBLK");
  3.            ed.WriteMessage($"\nDIMBLK is: {arrowName} \nID is: {db.Dimblk}\n");
  4.  
  5.            // Set to default 'Closed filled'
  6.            db.Dimblk = ObjectId.Null;
  7.  
  8.            arrowName = (string)AcadApp.GetSystemVariable("DIMBLK");
  9.            ed.WriteMessage($"\nDIMBLK is: {arrowName} \nID is: {db.Dimblk}\n");
  10.  
  11.  

called Kerry in my other life

Sometimes the question is more important than the answer.

samideqlqpart

  • Newt
  • Posts: 35
Re: Closed filled arrowhead bug
« Reply #5 on: December 27, 2016, 04:53:22 pm »
hi!
that's what i need
thank you very much