.NET

Reply
Distinguished Contributor
172 Posts
1 Kudo
Registered: ‎11-19-2003
Post 1 of 3

Xdata

166 Views, 2 Replies
12-06-2005 05:04 AM
I have set some data in a dictionary like this in VBA, how can i do this in
c#.net and how do i get this data again?

Public Sub MSTMDictWrite(UFAK, UNIT, SFAK, LayoutMM)

Dim dctMyDict As AcadDictionary
Dim xrecMyRecord As AcadXRecord

Dim varType(3) As Integer
Dim varData(3) As Variant

varType(0) = 40
varData(0) = UFAK
varType(1) = 0
varData(1) = UNIT
varType(2) = 41
varData(2) = SFAK
varType(3) = 60
varData(3) = LayoutMM

Set dctMyDict = ThisDrawing.dictionaries.Add("PAUSER")


Set xrecMyRecord = dctMyDict.AddXRecord("DWGInfoMassstab")
'xrecMyRecord.SetXData varType, varData

xrecMyRecord.SetXRecordData varType, varData

End Sub


--
Roland Feletic
*Adam Nagy
Post 2 of 3

Re: Xdata

12-09-2005 07:41 AM in reply to: RolandF
Hello RolandF,

I wrpote a very simple C# sample project.
I hope it will help you get started.

Cheers,
Adam

> I have set some data in a dictionary like this in VBA, how can i do
> this in
>
> c#.net and how do i get this data again?
>
> Public Sub MSTMDictWrite(UFAK, UNIT, SFAK, LayoutMM)
>
> Dim dctMyDict As AcadDictionary
> Dim xrecMyRecord As AcadXRecord
> Dim varType(3) As Integer
> Dim varData(3) As Variant
> varType(0) = 40
> varData(0) = UFAK
> varType(1) = 0
> varData(1) = UNIT
> varType(2) = 41
> varData(2) = SFAK
> varType(3) = 60
> varData(3) = LayoutMM
> Set dctMyDict = ThisDrawing.dictionaries.Add("PAUSER")
>
> Set xrecMyRecord = dctMyDict.AddXRecord("DWGInfoMassstab")
> 'xrecMyRecord.SetXData varType, varData
> xrecMyRecord.SetXRecordData varType, varData
>
> End Sub
>
Distinguished Contributor
172 Posts
1 Kudo
Registered: ‎11-19-2003
Post 3 of 3

Re: Xdata

12-14-2005 05:17 AM in reply to: RolandF
Thank you,
sorry for my late answere, i was skiing ;-)
I think this will help me much, gives me a good start.

--
Roland Feletic

"Adam Nagy" schrieb im Newsbeitrag
news:5034165@discussion.autodesk.com...
Hello RolandF,

I wrpote a very simple C# sample project.
I hope it will help you get started.

Cheers,
Adam

> I have set some data in a dictionary like this in VBA, how can i do
> this in
>
> c#.net and how do i get this data again?
>
> Public Sub MSTMDictWrite(UFAK, UNIT, SFAK, LayoutMM)
>
> Dim dctMyDict As AcadDictionary
> Dim xrecMyRecord As AcadXRecord
> Dim varType(3) As Integer
> Dim varData(3) As Variant
> varType(0) = 40
> varData(0) = UFAK
> varType(1) = 0

> varData(1) = UNIT
> varType(2) = 41
> varData(2) = SFAK
> varType(3) = 60
> varData(3) = LayoutMM
> Set dctMyDict = ThisDrawing.dictionaries.Add("PAUSER")
>
> Set xrecMyRecord = dctMyDict.AddXRecord("DWGInfoMassstab")
> 'xrecMyRecord.SetXData varType, varData
> xrecMyRecord.SetXRecordData varType, varData
>
> End Sub
>
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are you interested in helping shape the future of the Autodesk Community? To participate in this brief usability study, please click here. Your time and input is greatly appreciated!