.NET

Reply
Distinguished Contributor
RolandF
Posts: 172
Registered: ‎11-19-2003
Message 1 of 3 (159 Views)

Xdata

159 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
Message 2 of 3 (159 Views)

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
RolandF
Posts: 172
Registered: ‎11-19-2003
Message 3 of 3 (159 Views)

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
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.