.NET

Reply
Contributor
Kamala
Posts: 18
Registered: ‎03-01-2006
Message 1 of 1 (58 Views)

Current sheet

58 Views, 0 Replies
07-13-2006 11:03 PM
hi
Can any1 give a clue to me how to make a drawing active and perform required activity and close the document.
I have a collection of drawings which are opened one by one and the user is asked to pick a point to place the required component.
My program is not able to make the document active for the user to edit
instead it is present as an active file at the background.

Below is the code can you please help me in this.
Try
For Each lCTempObject In ldwgFolder
lactiveFilename = lCTempObject
If lactiveFilename.EndsWith("dwg") Or lactiveFilename.EndsWith("DWG") Then
ldwgfilename = lactiveFilename.Substring(lactiveFilename.LastIndexOf("\") + 1)
larryavai = larrMasterBOMlist.Contains(lactiveFilename)
If larryavai = True Then
Else
lCActiveDoc = Application.DocumentManager.Open(lactiveFilename, False)
lCLock = lCActiveDoc.LockDocument(DocumentLockMode.ProtectedAutoWrite, Nothing, Nothing, True)
lCActiveDB = lCActiveDoc.Database
lCActiveTransMan = lCActiveDB.TransactionManager
lCActiveTrans = lCActiveTransMan.StartTransaction
lCActiveBlockTable = lCActiveTrans.GetObject(lCActiveDB.BlockTableId, OpenMode.ForWrite)

Dim prPosRes, luserpt As PromptPointResult
Dim usercon As New Point3d
luserpt = Application.DocumentManager.MdiActiveDocument.Editor.GetPoint("Select a Point to place the Item Callout")
usercon = New Point3d(luserpt.Value.X, luserpt.Value.Y, luserpt.Value.Z)
-------------------------------------
------the operation---------------
EndIf
EndIf
Next
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 or visit the Installation and Licensing Forum to get help installing your software.