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

0 Members and 1 Guest are viewing this topic.

samideqlqpart

  • Newt
  • Posts: 40
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_nz

  • Mesozoic keyThumper
  • SuperMod
  • Water Moccasin
  • Posts: 2124
  • 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
Retired; but they dragged me back in !

I live at UTC + 13.00

---
some people complain about loading the dishwasher.
Sometimes the question is more important than the answer.

samideqlqpart

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

samideqlqpart

  • Newt
  • Posts: 40
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_nz

  • Mesozoic keyThumper
  • SuperMod
  • Water Moccasin
  • Posts: 2124
  • 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
Retired; but they dragged me back in !

I live at UTC + 13.00

---
some people complain about loading the dishwasher.
Sometimes the question is more important than the answer.

samideqlqpart

  • Newt
  • Posts: 40
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