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

How to regen(acAllViewports) with vb.net?

8 REPLIES 8
Reply
Message 1 of 9
Anonymous
5369 Views, 8 Replies

How to regen(acAllViewports) with vb.net?


I've been trying to get my "view" to regen after I thaw selected
layers, but have only gotten a partial solution..



editor.regen()



That works fine for the active space, but i need a way to regen
everything.



I found a few methods posted here by Tony, but couldn't figure out how
to get them to work in vb.net  (I guess they are in another .net
language).



some help would be appreciated.

--

Work: VISTA Ultimate/Windows 7 x32 - AMD
64 X2 Dual Core 4200 2.2GHz, 4 Gigs Ram, GeForce
6800GS 256MB


Home: VISTA Ultimate x64 - AMD 64 Quad
Core 2.2GHz, 8 Gigs Ram, GeForce 8600GT 512MB


Laptop (17" HP): VISTA Premium x32 -
color="#000000">AMD Turion X2 Dual Core TL-50 1.6GHz, 2 Gigs Ram,
color="#666666">Nvidia GeForce 6150

8 REPLIES 8
Message 2 of 9
Anonymous
in reply to: Anonymous

Application.DocumentManager.MdiActiveDocument.AcadDocument.Regen(1)

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009

http://www.acadxtabs.com

Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm


"C Witt" wrote in message
news:6140759@discussion.autodesk.com...
I've been trying to get my "view" to regen after I thaw selected layers, but
have only gotten a partial solution..

editor.regen()

That works fine for the active space, but i need a way to regen everything.

I found a few methods posted here by Tony, but couldn't figure out how to
get them to work in vb.net (I guess they are in another .net language).

some help would be appreciated.

--
Work: VISTA Ultimate/Windows 7 x32 - AMD 64 X2 Dual Core 4200 2.2GHz, 4 Gigs
Ram, GeForce 6800GS 256MB
Home: VISTA Ultimate x64 - AMD 64 Quad Core 2.2GHz, 8 Gigs Ram, GeForce
8600GT 512MB
Laptop (17" HP): VISTA Premium x32 - AMD Turion X2 Dual Core TL-50 1.6GHz, 2
Gigs Ram, Nvidia GeForce 6150
Message 3 of 9
Anonymous
in reply to: Anonymous

Thank you!

*Work*: VISTA Ultimate/Windows 7 x32 - /AMD 64 X2 Dual Core 4200 2.2GHz,
4 Gigs Ram, GeForce 6800GS 256MB/
*Home*: VISTA Ultimate x64 - /AMD 64 Quad Core 2.2GHz, 8 Gigs Ram,
GeForce 8600GT 512MB/
*Laptop (17" HP)*: VISTA Premium x32 - /AMD Turion X2 Dual Core TL-50
1.6GHz, 2 Gigs Ram, Nvidia GeForce 6150/


Tony Tanzillo wrote:
> Application.DocumentManager.MdiActiveDocument.AcadDocument.Regen(1)
>
>
Message 4 of 9
GTVic
in reply to: Anonymous

Application.DocumentManager.MdiActiveDocument.AcadDocument.Regen(1)

Why is it that Regen does not show up as a method for the AcadDocument object?
Message 5 of 9
Anonymous
in reply to: Anonymous

does not show up where?

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009

http://www.acadxtabs.com

Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm


wrote in message news:6147397@discussion.autodesk.com...
Application.DocumentManager.MdiActiveDocument.AcadDocument.Regen(1)
Why is it that Regen does not show up as a method for the AcadDocument
object?
Message 6 of 9
GTVic
in reply to: Anonymous

In Visual Studio 2008, when you hit the period after AcadDocument, you get a popup of all available methods/properties/etc, but Regen is not in the list. Unless I made a mistake but I was fairly careful???
Message 7 of 9
Anonymous
in reply to: Anonymous

Look at the type of the Document's AcadDocument
property, and see if you can figure out why.


--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009

http://www.acadxtabs.com

Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm


wrote in message news:6148249@discussion.autodesk.com...
In Visual Studio 2008, when you hit the period after AcadDocument, you get a
popup of all available methods/properties/etc, but Regen is not in the list.
Unless I made a mistake but I was fairly careful???
Message 8 of 9
GTVic
in reply to: Anonymous

Ah, because it is a generic object. Do you know why do they do that?

I always wondered why Excel VBA never gives you anything and this explains it. For example, if you type "ActiveSheet." you get nothing. But if you do this:
{code}Dim ss As Excel.Worksheet
Set ss = ActiveSheet{code}
Then if you type "ss.", you get all of the methods/etc.

So, after searching for Regen in the Object Browser, I think I can do the following:
{code}Dim AcadDoc as Autodesk.AutoCAD.ApplicationServices.Document
Dim DocEditor as Autodesk.AutoCAD.EditorInput.Editor

AcadDoc = Application.DocumentManager.MdiActiveDocument
DocEditor = AcadDoc.AcadDocument
DocEditor.Regen(1){code}
So now Regen shows up when you hit "." but it doesn't show as accepting a parameter???
Message 9 of 9
Anonymous
in reply to: Anonymous

The reason they don't use the COM types, is because they don't want
acmdg.dll and acdbmdg.dll to have any depencence on the COM interop type
library dlls, which would be bad because the COM libraries are
version-specific.

If you want to use the COM libraries you can but beware that if you do, you
may not be able to use the same assembly in different product releases
because of that.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009

http://www.acadxtabs.com

Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm


wrote in message news:6148459@discussion.autodesk.com...
Ah, because it is a generic object. Do you know why do they do that? I
always wondered why Excel VBA never gives you anything and this explains it.
For example, if you type "ActiveSheet." you get nothing. But if you do this:
{code}Dim ss As Excel.Worksheet Set ss = ActiveSheet{code} Then if you type
"ss.", you get all of the methods/etc. So, after searching for Regen in the
Object Browser, I think I can do the following: {code}Dim AcadDoc as
Autodesk.AutoCAD.ApplicationServices.Document Dim DocEditor as
Autodesk.AutoCAD.EditorInput.Editor AcadDoc =
Application.DocumentManager.MdiActiveDocument DocEditor =
AcadDoc.AcadDocument DocEditor.Regen(1){code} So now Regen shows up when you
hit "." but it doesn't show as accepting a parameter???

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