.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Reply
Message 1 of 3
Anonymous
378 Views, 2 Replies

Xdata

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
2 REPLIES 2
Message 2 of 3
Anonymous
in reply to: Anonymous

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
>
Message 3 of 3
Anonymous
in reply to: Anonymous

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
>

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