.NET

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

Xdata

145 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 (145 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 (145 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
>

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

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 to get help installing your software.

Ask the Community