Jump to content
Developer Wiki and Function Reference Links ×

GetComponentPenStyles fails in VW 2013


Recommended Posts

I am having nothing but troubles with walls in VW 2013.

I have written several scripts to change line and fill styles and colors in walls for different sheets in my drawings, and in 2012 they all work fine, but in 2013 they are failing to work properly (no VS errors, the walls just don't change as expected).

I have found that the offending function is GetComponentPenStyles which incorrectly returns Positive numbers for dashed line component pen styles.

In VW 2012 the function correctly returns a Negative number for the pen style of a component if it is a dashed pen style.

I am pretty sure this has to do with pen styles changing from being Attributes to being Resources in VW 2013.

I suspect this because of another problem I am having. Walls or styled walls that contain components that use dashed line styles that are created in a VW 2012 file which is then converted to a VW 2013 file seem to look o.k. in the VW 2013 file. But if you then copy the walls and paste them into a different VW 2013 file, the dashed line components disappear in the new file.

It's as if the wall cannot find the dashed line style, so it replaces it with None. If you edit the components of the unstyled wall you will see the components are still there, the line style is just set to None.

As an architect, I usually use walls in my buildings, so I find these problems pretty critical.

Link to comment

The problem is deeper than that. If you import the line styles into the other document, they look correct and use the correct line style in the resource browser thumbnail view, but if you try to draw a wall with the wall tool using one of the styles with dashed component lines the component lines disappear (go to "none").

If you then un-style that wall and check the components they are set to None. If you then reset them to dashed style and exit the components, the dashed components reappear in the wall, but they are using a different dash style.

They do not use the dash of the correct name, but instead use the dash that is in the same position in the dashed line list. The problem with that is, when you import a dash style it adds it to the end of the list of dash styles, not in the same position in the list, so the wall substitutes whatever style is in the same position in the dash list of the original file it came from, and not the one of the correct name.

Also, a similar thing happens to walls with no components, but dashed wall lines (like an optional or hidden wall style). When these wall styles are imported to another file and drawn, the wall completely disappears, but if you Un-style the wall and look in the attributes palette, it shows a dashed line, but the wall is still hidden. If you reselect the dash in the attributes palette the wall reappears with the dashed lines.

I originally thought this was a problem with VS GetComponentPenStyles incorrectly identifying a dash, but it is actually a problem of the wall not showing the dash.

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...