Jump to content

Recommended Posts

Posted

Hello there I am having bit of a problem with my setxdata function I wrote on vba. The problem is I am trying to store objectid of polyline in to different line by first converting that objectid in to string and then store in by 1000 group code via setxdata. But somehow it gives me this error "Invalid argument group code in the type SetxData method". I tried many other codes but my efforst are futile. The code can be seen below.

 

Public Function setdata(polyid1 As Variant, polyid2 As Variant, akot As Variant, polyid3 As Variant)

Dim datatipi(0 To 3) As Integer
Dim data(0 To 3) As Variant

datatipi(0) = 1000 'arazi profil çizgi id
datatipi(1) = 1000 'arazi plan çizgi id
datatipi(2) = 1000 'arazi profil ilk kotu
datatipi(3) = 1000 'çizilen hattın id'si

data(0) = CStr(polyid1)
data(1) = CStr(polyid2)
data(2) = CStr(akot)
data(3) = CStr(polyid3)
Stop
ActiveDocument.ObjectIdToObject(polyid1).SetXData datatipi, data
ActiveDocument.ObjectIdToObject(polyid2).SetXData datatipi, data
ActiveDocument.ObjectIdToObject(polyid3).SetXData datatipi, data


End Function

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...