Community
Civil 3D Forum
Welcome to Autodesk’s Civil 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Civil 3D topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Property sets. "If" condition with text value

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
psvTPWNK
1279 Views, 2 Replies

Property sets. "If" condition with text value

Hello everyone.

Can VBScript in property sets work with conditions with text values?

 

It's my example

 

RESULT="--"
On Error Resume Next
Set oApp=GetObject(, "AutoCAD.Application")
Set oCivilApp=oApp.GetInterfaceObject("AeccXUiPipe.AeccPipeApplication.13.2")
Set obj=oCivilApp.ActiveDocument.HandleToObject("[Обработка]")

If [TestString] = "testValue" Then
	RESULT = "yes"
Else
	RESULT = "no"
End If

This example returns me "no" but I expect "yes", even if my object has "testValue" in TestString parameter.

I attach test example. Thank you in advance.

2 REPLIES 2
Message 2 of 3
Jowennl
in reply to: psvTPWNK

Hi @psvTPWNK ,

 

Yes this is doable. Make it String = String, you just need to add "......"

 

If "[TestString]" = "testValue" Then

 

See sample animated gif.

Make it Str = Str by adding " "Make it Str = Str by adding " "

 

Cheers,

Jowenn

Message 3 of 3
aditya_lakkewar
in reply to: Jowennl

It worked for me, thank you so much, and keep up helping people.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


 

Autodesk Design & Make Report