.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

"Ghost" image during insert

7 REPLIES 7
Reply
Message 1 of 8
Anonymous
540 Views, 7 Replies

"Ghost" image during insert

In .Net, how would I get the "ghosted" image of a block during insertion?
In Arx I accomplished this via the regular insert command and acedCommand.
Using acedCommand in .net is pretty lame though and "sendstring" is even
lamer. Is there some other way of doing an Acad style insert?

Perry
7 REPLIES 7
Message 2 of 8
NathTay
in reply to: Anonymous

Search the group for jig or jigging.

Regards - Nathan
Message 3 of 8
Anonymous
in reply to: Anonymous

Nathan Taylor wrote:
> Search the group for jig or jigging.
>
> Regards - Nathan

Thanks for the tip Nathan.
Does'nt look like jig will work though. It apparently only works on
"simple" entities and I need it for blocks/tables etc.
Perry
Message 4 of 8
NathTay
in reply to: Anonymous

Attached is a VB.NET example with a block.

Regards - Nathan
Message 5 of 8
Anonymous
in reply to: Anonymous

Nathan Taylor wrote:
> Attached is a VB.NET example with a block.
>
> Regards - Nathan
>
>
> ------------------------------------------------------------------------
Thanks a bunch Nathan.
Sorry I didnt answer sooner, didnt realize till a couple days ago you posted.

I didnt even try anything like this because the docs gave the impression
that jig would only work with "simple" entities. Now I see thats not the case
so jig looks like a winner 😉
Couldnt get your code to compile at first. At the very beginning where your inserting
a block I got the error "Autodesk.AutoCAD.Interop.Common.AcadBlockReference is not defined"
neither could I find it in the object browser. So I just commented out that part and inserted
the block by hand and it compiled fine.
Then, the "jig" would not move with the cursor, it stayed at 0,0. I found a slight typo in
the code. The line in the sampler functiona that reads
"If objCurCorsorPos objPrevCursorPos Then"
should read:
"If objCurCorsorPos <> objPrevCursorPos Then"
Surprised I didnt get a compiler error on that. After that change, it work
nicely. Im translating it into C# to incorporate into my progam now.
Thanks again !
Perry
Message 6 of 8
Anonymous
in reply to: Anonymous

You may want to check this out.

http://www.theswamp.org/index.php?topic=11340.0
--
Bobby C. Jones

"perry" wrote in message
news:5258056@discussion.autodesk.com...
Nathan Taylor wrote:
> Attached is a VB.NET example with a block.
>
> Regards - Nathan
>
>
> ------------------------------------------------------------------------
Thanks a bunch Nathan.
Sorry I didnt answer sooner, didnt realize till a couple days ago you
posted.

I didnt even try anything like this because the docs gave the impression
that jig would only work with "simple" entities. Now I see thats not the
case
so jig looks like a winner 😉
Couldnt get your code to compile at first. At the very beginning where your
inserting
a block I got the error "Autodesk.AutoCAD.Interop.Common.AcadBlockReference
is not defined"
neither could I find it in the object browser. So I just commented out that
part and inserted
the block by hand and it compiled fine.
Then, the "jig" would not move with the cursor, it stayed at 0,0. I found a
slight typo in
the code. The line in the sampler functiona that reads
"If objCurCorsorPos objPrevCursorPos Then"
should read:
"If objCurCorsorPos <> objPrevCursorPos Then"
Surprised I didnt get a compiler error on that. After that change, it work
nicely. Im translating it into C# to incorporate into my progam now.
Thanks again !
Perry
Message 7 of 8
Anonymous
in reply to: Anonymous

Bobby C. Jones wrote:
> You may want to check this out.
>
> http://www.theswamp.org/index.php?topic=11340.0

I had just stumbled upon that today!
It looks a bit more complicated than Nathans but I'll definately
check it out. ANYTHING on jigs would be helpful as Im still having
problems with them. Translated Nate's into C# and modified it to
insert a block but sometimes I get a fatal error (access violation)
and I havent found the cause yet. Very frustrating.
Eventually I want to insert a table with it, but that opens up
a different can of worms.
Perry
Message 8 of 8
NathTay
in reply to: Anonymous

I will be having a good look at that aswell. I also need to drag existing objects and the code I already have isn't appropriate.

Regards - Nathan

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost