.NET

.NET

Reply
Mentor
SRSDS
Posts: 247
Registered: ‎04-15-2011
Message 1 of 5 (376 Views)

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

376 Views, 4 Replies
04-11-2013 01:29 PM

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))

 

 

 

Moderator
Alexander.Rivilis
Posts: 1,406
Registered: ‎04-09-2008
Message 2 of 5 (367 Views)

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

04-11-2013 02:24 PM in reply to: SRSDS

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


Пожалуйста не забывайте про Утвердить в качестве решения! Утвердить в качестве решения и Give Kudos!Баллы
Please remember to Accept Solution! Accept as Solution and Give Kudos!Kudos

Active Contributor
ditran
Posts: 27
Registered: ‎01-28-2013
Message 3 of 5 (316 Views)

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

04-14-2013 12:30 AM in reply to: Alexander.Rivilis

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,

Mentor
SRSDS
Posts: 247
Registered: ‎04-15-2011
Message 4 of 5 (285 Views)

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

04-15-2013 12:21 PM in reply to: ditran

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?

 

Mentor
SRSDS
Posts: 247
Registered: ‎04-15-2011
Message 5 of 5 (280 Views)

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

04-15-2013 01:26 PM in reply to: SRSDS
Please ignore that last post. It's a nice jig so I won't delete it.
AcadNetAddinWizard_Namespace.BlockAttributeJig.DragAndRotateView()
Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.