Custom Properties Question
Custom Properties Question
(OP)
How can I insert a hard return in the value/text expression column. I have drawing which have this hard return, and it shows up as a box.
I can copy/paste this function, but I would like to know how to insert it without copy/paste.
I can copy/paste this function, but I would like to know how to insert it without copy/paste.






RE: Custom Properties Question
http://www.EsoxRepublic.com-SolidWorks API VB programming help
RE: Custom Properties Question
<alt>0010
RE: Custom Properties Question
RE: Custom Properties Question
Matt
CAD Engineer/ECN Analyst
Silicon Valley, CA
http://sw.fcsuper.com/index.php
RE: Custom Properties Question
Tics method produces the same result, which is to add text directly below original text. However when viewing the text in the custom property cell, I don't see both lines. If I click in the cell, then I can toggle back and forth and see the two lines of text.
The method I was looking for is one that keeps both lines of text on the same line in the custom property cell but they are separated by a symbol that looks just like a small box. Both lines of text are visable in the cell, and you're not required to toggle to see both of them.
It's possible that it is not a solidworks function, maybe a microsoft macro or something.
Does any of that make sense?
RE: Custom Properties Question
I believe the same box you are talking about went away with Windows XP.
SA
RE: Custom Properties Question
When placing a note on the drawing, window a text box rather than picking the location for your note. Then you can link to the custom property as you normally do. Resizing the text box will then wrap the text automatically. I have seen situations where I can't make this work the way I want (center-justified text where I want the lines separated in a particular place). It may have been possible, but I didn't spend a lot of time on it.
RE: Custom Properties Question
What I'm trying to find, is the way to enter this macro. Notice the small box between the text lines in the property cell.
When I have this in the property cell:
I get this on the drawing:
RE: Custom Properties Question
The downside is that this only works for configuration-specific properties.
RE: Custom Properties Question
Guess I was wrong, it still shows up. I know it disappeared somewhere after the upgrade to XP years ago.
But that is besides the point. Here is something for you to try. Start a part model. Next create a custom property in a the custom tab called BOX (use uppercase letters as shown) and give it the value x. Then run the following macro:
CODE
Dim swApp As Object
Dim swDoc As Object
Set swApp = Application.SldWorks
Set swDoc = swApp.ActiveDoc
swDoc.CustomInfo2("", "BOX") = "First Line" & vbLf & "Second Line"
End Sub
Now look at the custom property. You should see First Line but when you click on the value in the Value/Text Expression column you should see First Line[]Second Line.
Is this what you want to do?
SA
RE: Custom Properties Question
The consensus around the office here is to use the method that Tick described (<ALT> 0010).
The only problem I see is that it is limited to two lines, and we usually use three for descriptions.
Thanks again.
RE: Custom Properties Question
-Shaggy
RE: Custom Properties Question
Use this macro to make a word wrapped annotation note:
http:/
Original (german) version is here: http://swtools.cad.de/
Don't even try to control how the lines breaks. Not worth the effort. Just let the word land where they may. :) Just leave your annotation note wide enough to handle most scenarios.
Matt
CAD Engineer/ECN Analyst
Silicon Valley, CA
http://sw.fcsuper.com/index.php
RE: Custom Properties Question
RE: Custom Properties Question
One other thing that you can do is use the comments field on the summary tab of your part/assembly properties form. You can link to this field in the same manner you link to a custom property. This field allows multiple lines and you can insert line breaks where ever you'd like with a simple return.
The downside is that there's only one field like this, but if you only need this to populate your drawing title this will work.
RE: Custom Properties Question
Best Regards,
Scott Baugh, CSWP![[pc2] pc2](https://www.tipmaster.com/images/pc2.gif)
www.scottjbaugh.com
FAQ731-376
RE: Custom Properties Question
SW07-SP3