Valued Contributor
Posts: 82
Registered: ‎06-26-2008
Message 1 of 2 (154 Views)

Jig a block with keywords

154 Views, 1 Replies
08-06-2012 02:52 AM

I'm using the code from Kean's blog here to jig insert a block. What it's missing is the ability to change the rotation and base point during the jig.


I'm basically trying to reproduce the functionality that the normal Insert command gives which, I know, sounds a bit like I'm reinventing the wheel but I need to use the jig as I want to do other stuff to the block after the insert has finished like exploding it or changing its layer.


I've tried Tony T's commandline but that doesn't seem to work with commands that require user interaction.


I've got as far handling the keywords e.g. if the user enters "R" to rotate, I can ask them to enter an angle using ed.GetAngle but then if I call Run on the jig again (to continue the jig), the point that the block is inserted at is different to where the user clicked to place it. Calling Run again here might not be the right thing to do...


Also, I can't see how to temporarily add the block to the drawing so that the user can select a new base point by entering B.


All pointers gratefully received.



ADN Support Specialist
Posts: 746
Registered: ‎03-21-2011
Message 2 of 2 (106 Views)

Re: Jig a block with keywords

08-10-2012 04:49 AM in reply to: Paulio

Hi Paulio,


Have you seen the latest post (posted today :smileyhappy:) on Kean's blog ?



Sorry, I did not understand the need for you to call the "Run" method again. Are you not getting the inputs along with the keywords in the "Sampler" method ? Kean's blog post does the same.


If this does not help, can you please explain the kind of behavior that you are trying to achieve ?

A buildable sample project demonstrating the issue will also be helpful.

Developer Technical Services
Autodesk Developer Network

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.