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

Layout units?

2 REPLIES 2
Reply
Message 1 of 3
Anonymous
257 Views, 2 Replies

Layout units?


OK, first off this IS a request for a .net equivalent to a vba tool (or
option/setting if you prefer).



In VBA I used this to determine the units (Metric or imperial)..



ThisDrawing.PaperSpace.Layout.PaperUnits





I've found a few settings that "seem" to be what I'm after but so far
they aren't working so I must be barking up the wrong tree.

Can someone please tell me what I need to use to get this info in .NET?



One side note, yes I do realize .NET is not the same as VBA (hence why
I am here asking).

--

Work: VISTA Ultimate 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

2 REPLIES 2
Message 2 of 3
Anonymous
in reply to: Anonymous

bt = trans.GetObject(db.BlockTableId, OpenMode.ForRead)

btrSpace = trans.GetObject(bt(BlockTableRecord.PaperSpace), OpenMode.ForRead)

Dim lay As Layout = trans.GetObject(btrSpace.LayoutId, OpenMode.ForRead)

Dim unit As PlotPaperUnit = lay.PlotPaperUnits



should get you close...



jvj Edited by: JamieVJohnson on Dec 17, 2008 12:56 PM
Message 3 of 3
Anonymous
in reply to: Anonymous


Thank you!



That is exactly what I was after (looks like I was close..  the whole
"plotpaperunits"..  just didn't know how to use it.



Thank you again.



Work: VISTA
Ultimate x32 - AMD 64 X2 Dual Core 4200 2.2GHz, 4 Gigs Ram,
color="#666666">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





JamieVJohnson wrote:
bt =
trans.GetObject(db.BlockTableId, OpenMode.ForRead)



btrSpace = trans.GetObject(bt(BlockTableRecord.PaperSpace),
OpenMode.ForRead)



Dim lay As Layout = trans.GetObject(btrSpace.LayoutId, OpenMode.ForRead)



Dim unit As PlotPaperUnit = lay.PlotPaperUnits







should get you close...







jvj
Edited by: JamieVJohnson on Dec 17, 2008 12:56 PM

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