Skip to Content
0

VBScript Move Comments Property content to Definition Property

May 21 at 12:32 PM

29

avatar image

cusersfreym05documentspowerdesignervb-scriptspfe-c.txtWith 16.6 I am working to programmatically move the Comments property of Entities and Entity Attributes to the 16.6 introduced Definition property. I have chosen to accomplish this goal using the following VBScript, I receive a "" error, and no content is moved. The example scripts I've seen show cdmEntity.SetAttribute "Comment", "cdmEntity.Comment" to set a Property, however this doesn't seem to save the change, any experiential advice? Thanks in advance, note attached in the script.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Michael Frey May 21 at 01:22 PM
0

That's brilliant! Thank you George, as you stated even simpler than I thought. Have a great afternoon! Cheers

Show 1 Share
10 |10000 characters needed characters left characters exceeded

No problem

0
George McGeachie May 21 at 12:57 PM
0

It's simpler than you think. This line should do it:

cdmEntity.Description = cdmEntity.Comment

If you were copying in the other direction, you'd need this:

cdmEntity.Comment = Rtf2Ascii(cdmEntity.Description)

Show 1 Share
10 |10000 characters needed characters left characters exceeded

By the way, Michael, your original code sets the Comment property to the Comment property, not the Description :)

cdmEntity.SetAttribute "Comment", "cdmEntity.Comment"
0