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

Current sheet

0 REPLIES 0
Reply
Message 1 of 1
Kamala
186 Views, 0 Replies

Current sheet

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
0 REPLIES 0

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