ObjectID and general help!

ObjectID and general help!

Anonymous
Not applicable
1,158 Views
5 Replies
Message 1 of 6

ObjectID and general help!

Anonymous
Not applicable

I have the following snippet.

GetTheObj returns the selected object's ID

 

Dim

myVportID As DatabaseServices.ObjectId

GetTheObj(nmyVportID,"VIEWPORT")

Dim S1 As String

S1 ="%<\AcObjProp Object(%<\_ObjId" & myVportID.ToString & ">%).CustomScale \f ""%lu2%qf2816"">% "

the problem is that myVportID.ToString return my ID # in brackets i.e. (9183278172)

And on another note where can I find help on all the different methods and properties etc on the Adesk stuff (yes very technical term)

I looked in the Object Browser in my VS 2010 and there is not much nothing there.

I am sure it is just me. I am migrating from VBA.

0 Likes
1,159 Views
5 Replies
Replies (5)
Message 2 of 6

Anonymous
Not applicable

Here are two different ways to do it, there are more

 

 Dim myVportIdToString As String = "(9183278172)"
        Dim useSubStringMethod As String = myVportIdToString.Substring(1, myVportIdToString.Length - 2)
        Dim useRemoveMethod As String = myVportIdToString.Remove(myVportIdToString.Length - 1).Remove(0, 1)
        ''''useSubStringMethod & useRemoveMethod = 9183278172
0 Likes
Message 3 of 6

Anonymous
Not applicable

Thanks Jeffrey

That works

I just thought that I was missing something in the method

Odd why it would return a string closed in brackets.

My LISP days came rushing in, thought I may have to (setq A (car myVportIdToString.Substring))

 

all the same thanks again.

 

any idea in regards to help on all the different methods, or do they just not exists.

0 Likes
Message 4 of 6

Anonymous
Not applicable

Go to where you installed ObjectARX SDK or here http://usa.autodesk.com/adsk/servlet/index?siteID=123112&id=1911627

In there is a docs folder.

I use arxdoc.chm which contains the arxmgd.chm(.NET), but the arxdoc.chm has alot more info in it.

I tend to use the index tab mostly.

 

0 Likes
Message 5 of 6

Anonymous
Not applicable

thanks Jeffrey

this is great stuff

 

on a side note, apprently

myVportID.OldIdPtr.ToString()

returns the object id string without the brackets.

 

0 Likes
Message 6 of 6

Anonymous
Not applicable

That seems to be a better way

Thanks for the info

0 Likes