Get ObjectId

Get ObjectId

DRossger
Advocate Advocate
614 Views
3 Replies
Message 1 of 4

Get ObjectId

DRossger
Advocate
Advocate

Hello!

 

Can somebody explain how to get ObjectId without an object ?

I want create a Pipe in Civil3D as I found it here:

https://knowledge.autodesk.com/support/civil-3d/learn-explore/caas/CloudHelp/cloudhelp/2015/ENU/Civi...

 

but I have some trouble with "AddLinePipe", method want a parameter in method  

oNetwork.AddLinePipe(oid, psize, line, ref oidNewPipe, false); what means that ? 

oidNewPipe is well NULL or ....

 

 

0 Likes
615 Views
3 Replies
Replies (3)
Message 2 of 4

Alexander.Rivilis
Mentor
Mentor

@DRossger wrote:

Hello!

 

Can somebody explain how to get ObjectId without an object ?

I want create a Pipe in Civil3D as I found it here:

https://knowledge.autodesk.com/support/civil-3d/learn-explore/caas/CloudHelp/cloudhelp/2015/ENU/Civi...

 

but I have some trouble with "AddLinePipe", method want a parameter in method  

oNetwork.AddLinePipe(oid, psize, line, ref oidNewPipe, false); what means that ? 

oidNewPipe is well NULL or ....

 

 


That means oidNewPipe after calling oNetwork.AddLinePipe will be setting to ObjectId of new created and added to Database Pipe. See example in your URL reference.

Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | Do you find the posts helpful? "LIKE" these posts!
Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям!
На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ"


Alexander Rivilis / Александр Ривилис / Олександр Рівіліс
Programmer & Teacher & Helper / Программист - Учитель - Помощник / Програміст - вчитель - помічник
Facebook | Twitter | LinkedIn
Expert Elite Member

0 Likes
Message 3 of 4

DRossger
Advocate
Advocate

Yes I read it and test sample code-snippet but exactly in this AddLinePipe-method I get an exception 

ex = {"Fail to add line pipe."}

because oidNewPipe is empty or NULL. How works ref, maybe I do it wrong ?

Is it possible to create ObjectId without object ?

0 Likes
Message 4 of 4

Alexander.Rivilis
Mentor
Mentor

@DRossger wrote:

Yes I read it and test sample code-snippet but exactly in this AddLinePipe-method I get an exception 

ex = {"Fail to add line pipe."}

because oidNewPipe is empty or NULL. How works ref, maybe I do it wrong ?

Is it possible to create ObjectId without object ?


Sorry but it is look like you wrong. Method AddLinePipe have to fill oidNewPipe. So you have not initialize oidNewPipe other then ObjectId.Null.

Exception can be thrown because of other problems with your code.

Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | Do you find the posts helpful? "LIKE" these posts!
Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям!
На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ"


Alexander Rivilis / Александр Ривилис / Олександр Рівіліс
Programmer & Teacher & Helper / Программист - Учитель - Помощник / Програміст - вчитель - помічник
Facebook | Twitter | LinkedIn
Expert Elite Member

0 Likes