.NET

Reply
Distinguished Contributor
SRSDS
Posts: 243
Registered: ‎04-15-2011
Message 1 of 5 (362 Views)

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

362 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,398
Registered: ‎04-09-2008
Message 2 of 5 (353 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 (302 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,

Distinguished Contributor
SRSDS
Posts: 243
Registered: ‎04-15-2011
Message 4 of 5 (271 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?

 

Distinguished Contributor
SRSDS
Posts: 243
Registered: ‎04-15-2011
Message 5 of 5 (266 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()

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

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 to get help installing your software.

Ask the Community