use of AcEdJig with blocks

use of AcEdJig with blocks

Anonymous
Not applicable
968 Views
3 Replies
Message 1 of 4

use of AcEdJig with blocks

Anonymous
Not applicable
Hi all!

I want to implement a similar functionality to the Insert>Block function
in ACAD and therefor I want to use the AcEdJig class to get a
preview of the block going to be inserted. The user only has to select
a insertion position. I used the "elipsjig" Sample from the sdk and
modified the code for my special preferences.
The Problem is, that no preivew is drawn.
There is a small code snip:

void MyJig::doIt()
{
mPromptCounter = 0;
setDispPrompt("\nInsertion Point?: ");
AcEdJig::DragStatus stat = drag();

append();
}

AcEdJig::DragStatus MyJig::sampler()
{
DragStatus stat;

setUserInputControls((UserInputControls)
(AcEdJig::kAccept3dCoordinates
| AcEdJig::kNoNegativeResponseAccepted
| AcEdJig::kNoZeroResponseAccepted));

if (mPromptCounter == 0) {

//
static AcGePoint3d axisPointTemp;
stat = acquirePoint(m_CenterPt);
}

return stat;
}

In the following function the Ellipse was set in the example.
What should I do with my block right in here?

Adesk::Boolean MyJig::update()
{
switch (mPromptCounter) {
case 0:

break;
}

return Adesk::kTrue;
}

Any help would be appreciated.
Thanks, Markus
0 Likes
969 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable
What are you returning in your AcEdJig::entity() override...

|
----+----------------------------------------------
| Byron Blattel
| CADwerx---Applications for AutoCAD
| Autodesk Registered Developer
| email: byron@cadwerx.net
| web site: http://www.cadwerx.net
|
0 Likes
Message 3 of 4

Anonymous
Not applicable
Hi!

Thanks for your help, but I fixed the problem I posted before by myself.
But now I have another problem with my AcEdJig class...
I already get the preview I want and the Block is inserted on the
position, which the user selects. But when I move the mouse over
the Block in ACAD I receive the following error:

** Undefined block #5

What does it mean?
The block is inserted with the AcEdJig::append() function.

I hope someone can help, Markus
0 Likes
Message 4 of 4

Anonymous
Not applicable
Add to update method
=============================
mpBlkRef->setPosition(m_CenterPt);

this is my source code
mpBlkRef->setRotation(mAngle);
=============================
0 Likes