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

SetSystemVariable in remote drawing?

1 REPLY 1
SOLVED
Reply
Message 1 of 2
Anonymous
539 Views, 1 Reply

SetSystemVariable in remote drawing?

When working in the host drawing (the one that is open in CAD and visible) I use ApplicationServices.Application.SetSystemVariable.   What do i use (if it is even possible) to set variables in a drawing being accessed remotely via this method..

 

Using TargetDB As New Database(False, True)

 TargetDB.ReadDwgFile(Me.TabControl1.TabPages(DWGPath).Tag, System.IO.FileShare.Read, True, "")

 'set variable(s) here

 TargetDB.SaveAs(TargetDB.OriginalFileName, True, TargetDB.OriginalFileVersion, TargetDB.SecurityParameters)

End using

 

 

 

??

1 REPLY 1
Message 2 of 2
Anonymous
in reply to: Anonymous

As you mentioned Application.SetSystemVariable will set "document level" variables for the current document.

For example:

Application.SetSystemVariable("CLAYER", "LayerName")(applies to current document)

 

You could also use HostApplicationServices.WorkingDatabase.Clayer = LayerName.ObjectId.

 

 

So if it is a "document level" variable it should be a property of the database.

In your example:

TargetDB.VariableName

 

 

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Forma Design Contest


Autodesk Design & Make Report