Jump to content

GetComponentPenStyles


Recommended Posts

Can anyone shed some light on what this function really returns?

The Function reference for VW versions 2013, 2014 and 2015 all say the same thing regarding the right and left component pen style variable:

"Returns the pen style of the component's line. Positive values for patterns, negative values for dash styles."

Using this function in VW 2013 on a solid wall component line returns 2, but for a Line Type (dashed) wall component line it returns 3 (Not a negative number).

In 2014 or 2015, a solid wall component line returns 0 (Neither positive or negative), and for a Line Type (dashed) wall component line it returns 2.

Clearly the Function References are all incorrect, since after v. 2012 a dash style is now called a Line Type anyway, and the above function no longer returns a negative value for the "Line Type" component pen style, and as of 2014 it returns a 0 for a solid pen style.

With a 0 for solid, how do you know if the line is solid foreground or solid background? I am pretty sure that 0 is no fill, 1 is solid background and 2 is solid foreground.

Is this a bug, or if not, what should I expect returned for solid lines and various different line types?

Link to comment

Additional information after further testing:

I have been testing the function on a low wall with wood cap, which has two outer solid lines (the cap) and two inner dashed lines (the wall below). Apparently this wall style had been imported from previous versions, so I thought I would try it on a newly created wall style.

So, I created a new wall style with the exact same line attributes as the imported style (i.e. the low wall with wood cap).

Running the "GetComponentPenStyles" on this wall returns different values, but still not correct. This time I still get a 0 for the outer (solid) line and a 13 for the inner (dashed) line. Still a zero for the solid line and no negative number for the dashed line.

For the next test, I changed the dashed line to pattern #13 and kept the solid line solid to see what I would get. This time when I ran the function it returned the expected values, a 2 for the solid line and a 13 for pattern #13.

I only changed the dashed line to a pattern, so why would the unchanged solid line return a different value than before?

Next, I ran the function on a simple hidden wall (i.e. no components, dashed outer lines). Here I actually get a negative number for the right component line (even though there are really no components in this wall).

This function seems totally whacked out, especially if you use a dashed line for one of the inner components. Once again it appears related to the confounding switch from Dash Style attributes to Line Type resources.

Please fix this function so that it works with walls of all line types, not just solid or patterned lines.

If anyone has a workaround, please let me know.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...