Insert block and drag Jig hiding inserted block at 0,0

Insert block and drag Jig hiding inserted block at 0,0

SRSDS
Advisor Advisor
1,289 Views
4 Replies
Message 1 of 5

Insert block and drag Jig hiding inserted block at 0,0

SRSDS
Advisor
Advisor

Hi,

I have a pallete button that inserts a block then a drag jig to position it. The block is first inserted at 0,0 and dragged.

The block at 0,0 remains visible while a "duplicate" block is dragged. Is there a way to hide the original?

 

Insert block then calling the drag jig..

            AddViewBlock(New Point3d(0, 0, 0), 0, ColorIndex, trans)
            psr = ed.SelectLast()
            DragView(psr.Value, "Bar Insertion Point")

 

In the DragView procedure I have:

 

Public Sub DragView(ByVal SS As SelectionSet, ByVal sPrompt As String)
'....
Dim ppr As PromptPointResult = ed.Drag(SS, vbLf & sPrompt, New DragCallback(AddressOf MyDragCallback))

 

 

 

0 Likes
1,290 Views
4 Replies
Replies (4)
Message 2 of 5

Alexander.Rivilis
Mentor
Mentor

IMHO you have to use "pure" JIG. I.e. instead of Editor.Drag(SelectionSet ...) you have to use Editor.Drag(Jig)

 

How to show a block when positioning it, using C#?

Using a jig from .NET to multiply insert AutoCAD blocks

Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | Do you find the posts helpful? "LIKE" these posts!
Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям!
На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ"


Alexander Rivilis / Александр Ривилис / Олександр Рівіліс
Programmer & Teacher & Helper / Программист - Учитель - Помощник / Програміст - вчитель - помічник
Facebook | Twitter | LinkedIn
Expert Elite Member

0 Likes
Message 3 of 5

Anonymous
Not applicable

Hi,

 

I want to add a line at the same time with insert block. What need I add into current code at link

How to show a block when positioning it, using C#?

 

Thanks for helps,

0 Likes
Message 4 of 5

SRSDS
Advisor
Advisor

I've just found this class to insert and rotate my block. Which is exactly what I need.

http://spiderinnet1.typepad.com/blog/2012/10/autocad-net-drag-blocks-attributes-with-entityjig-a-bet...

 

Can anyone tell me how to call the BlockAttributeJig_Method within the class from the main program?

 

0 Likes
Message 5 of 5

SRSDS
Advisor
Advisor
Please ignore that last post. It's a nice jig so I won't delete it.
AcadNetAddinWizard_Namespace.BlockAttributeJig.DragAndRotateView()
0 Likes