.NET

Reply
*perry
Message 1 of 8 (216 Views)

"Ghost" image during insert

216 Views, 7 Replies
06-27-2006 03:11 PM
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
Distinguished Contributor
NathTay
Posts: 1,691
Registered: ‎12-15-2003
Message 2 of 8 (216 Views)

Re: "Ghost" image during insert

06-27-2006 04:03 PM in reply to: *perry
Search the group for jig or jigging.

Regards - Nathan
*perry
Message 3 of 8 (216 Views)

Re: "Ghost" image during insert

07-21-2006 02:00 PM in reply to: *perry
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
Distinguished Contributor
NathTay
Posts: 1,691
Registered: ‎12-15-2003
Message 4 of 8 (216 Views)

Re: "Ghost" image during insert

07-23-2006 04:23 PM in reply to: *perry
Attached is a VB.NET example with a block.

Regards - Nathan
*perry
Message 5 of 8 (216 Views)

Re: "Ghost" image during insert

08-03-2006 09:57 AM in reply to: *perry
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 :smileywink:
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
*Bobby C. Jones
Message 6 of 8 (216 Views)

Re: "Ghost" image during insert

08-03-2006 10:37 AM in reply to: *perry
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 :smileywink:
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
*perry
Message 7 of 8 (216 Views)

Re: "Ghost" image during insert

08-04-2006 07:56 AM in reply to: *perry
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
Distinguished Contributor
NathTay
Posts: 1,691
Registered: ‎12-15-2003
Message 8 of 8 (216 Views)

Re: "Ghost" image during insert

08-06-2006 03:51 PM in reply to: *perry
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

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