.NET
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
How to check and manage Unit for insert a BlockRefer ence
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
105 Views, 1 Replies
02-26-2012 10:38 AM
Hi all i have a VBA code for check and choose unit but how i can in .NET ?
Unite = ThisDrawing.GetVariable("INSUNITS")
Select Case Unite
Case 4: Unite = 10 'mm
Case 5: Unite = 1 'cm
Case 6: Unite = 0.01 'm
Case Else: Unite = 1
End Selecti dont find help for this..
db.UnitMode is always = 0
i have try this :
Dim BlocT As BlockTable
Dim tr As Transaction = db.TransactionManager.StartTransaction
BlocT = tr.GetObject(db.BlockTableId, OpenMode.ForRead)
Dim Bloc As BlockTableRecord
Bloc = tr.GetObject(BlocT(BlockTableRecord.ModelSpace), OpenMode.ForRead)
Dim lay As Layout = tr.GetObject(Bloc.LayoutId, OpenMode.ForRead)
tr.Commit()
tr.Dispose()but bloc.units dont egal the unit command in autocad.
I can use :
Dim obj As Object = Application.GetSystemVariable("INSUNITS")
but i want a proper solution with .net.
anyone can help ?
Re: How to check and manage Unit for insert a BlockRefer ence
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
02-26-2012 11:45 AM in reply to:
AubelecBE



