-
Posts
2,825 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Articles
Marionette
Store
Posts posted by Dieter @ DWorks
-
-
@JIM: There once had been talked about not releasing yearly anymore, but releasing each feature when it was finished, so that VW would be more a continual updating program, which would benefit both the development team and the users, as users would have the chance to learn the new/improved tools in a timely manner, and not all at once, etc.... Are there still plans for this, as I would really love to see this, as I believe this will also open up the transparency to the users about the direction VW is going.
-
Hi, JBenghiat.
I've tried your suggestion and it works when I create a command but it doesn't when I create the same code in a tool. Any reason for that?
Thank you (code below)
import vs; def PickPointCallback(pt): vs.AlrtDialog( "Point {0}:{1}".format(pt[0],pt[1]) ) vs.GetPt( PickPointCallback )
Not an answer, but you can use lambda's and the % string format to shorten your code:
vs.GetPt(lambda pt: vs.AlrtDialog('Point %s:%s' % pt))
-
This is already in dlibrary, a helper library for python plug-ins: https://bitbucket.org/dieterdworks/vw-dlibrary/src/42443e6a43ea0c54b49d17e71a9b1071a6a0e908/dlibrary/document.py?at=master&fileviewer=file-view-default
check out the Units class from the document module. It's full with helper methods for this kind of thing.
Also, in dlibrary, many other functions will let you enter both a number or a string with the number and unit for their parameters, which is super helpful.
Everyone is free to contribute to it.
Especially this function:
@staticmethod def resolve_length_units(dimension): """Will return the same, but length unit strings will be transformed to floats. For a float or str dimension, this will return a float. For a tuple, which would be a point, this will return a tuple of floats. :type dimension: float | str | tuple :rtype: float | tuple """ if isinstance(dimension, str): return Units.__validate_length_str_to_length_units(dimension) elif isinstance(dimension, tuple): return tuple((Units.__validate_length_str_to_length_units(item) if isinstance(item, str) else item) for item in dimension) else: return dimension
-
There are a couple ways to do this.
The fast way is to draw the shape of the projection, then AEC > Pillar…
This will create a pillar that walls can join to.
In your particular case, if you are using wall styles, you can make a wall style that is super wide for the area in question.
Walls that butt join can be joined with the wall join tool in the L mode.
hth
mk
I find the thick wall solution the fastest and easiest in this kind of situations.
-
Just use the appropriate layer visibility setting.
-
Thx orso! This will come in handy real quick.
-
Just no file references, you will have:
I have the same situation.
-
Just no file references, you will have:
I have the same situation.
-
As I needed some text to be always uppercase in a title block, I was looking for a way to force it, rather than depending on the user to enter the stuff in uppercase, but there is not way.
So it would be nice if there where some text transformations as part of a text style like to uppercase.
-
Thanks Hippocode and Dieter for replying.
It would be easier to use a popup, which is what I've been using until I found out about the SymbolDisplayControl function.
The reason I'm trying to get SymbolDisplayControl to work is because it has a bigger preview window.
This exercise is to enable our users to browse our Architectural Details from an external file/files. By text search and visual display.
One way to avoid the bigger display is to choose names that really says what it is, so they can see from the smaller preview what they want. I know it's not the same, but sometimes you better don't go to far just for a small usability improvement when you don't have full control of the main program.
-
Python doesn't have vectors natively, but there are classes out there for you to use, like for example: https://gist.github.com/mcleonard/5351452
-
Will it not be easier to use a ThumbnailPopup? This in combination with a resource list will do what you are asking, without the need to import symbols, this will be so much easier.
Something like this:
1. You can build a resource list with resources from other documents, so you'll have access to them without needing to import them.
2. You can use a resource list to fill up the thumbnail popup, and VW will show them with the preview, like you can see them in the resource browser.
3. You can then add your own filtering, by refilling the popup after the filter has changed.
-
Also, don't forget that Python is case sensitive
This is the killer for me.
PYTHON IS CASE SENSITIVE.
python is case sensitive
Python is Case Sensitive.
More time debugging this than anything else.
That and the fact that it is also indent sensitive. Where you would use a Begin/End in VS, you have to indent properly instead.
Case Sensitivity is in a lot of programming languages, and I prefer it. Using a good IDE with code completion, there is no problem with it.
- 1
-
Can you give some examples? As I know of the use of layers like you are saying, but mostly there is a far better solution, like viewport annotations.
-
I always use the latest Windows, never had any problems related to Windows with Vectorworks.
-
Or use https://bitbucket.org/dieterdworks/vw-dlibrary, which has creation functions that always returns an object for you to use. It's open source, and you can help add to it.
-
One of them (from the menu) is the old one, and can't have components. Though it can be usefull for things other than slabs, where you want a simple extrude for 3D view, and a 2D shape in 2D plan view.
-
Hi,
CodeSchool has started a Python path. One of the courses is free. So for those starting out with Python, take a look. Courses on CodeSchool are fun, and you'll learn a lot, though it doesn't seem that way
-
+1000
Yes, we should be able to create symbols with walls that adapt to the height of their layer they are placed on, and the ability to connect to walls from outside these symbols. I wanted this for years. And such Module like you call it would be great!
-
Python is much better than VS, and can do a lot of things in one-liners, I love it for that! such simplicity.
-
What do you mean by randomising capitalisation? Something like:
ThIs Is someThinG WiTH raNdOm CaPTtiliSAtion.
-
For that last question, make sure your files always and with a blank line! I learned this the hard way, and it took me a while before I figured this out. If one of your files don't have it, VS will throw errors that are unrelated, so than it's happy hunting.
Developer mode should be in the VW settings, with all the other ones. (I have a Dutch version, so no point of telling you the name.)
The OIP will be populated with the plugin parameters. The widgets used depends on the parameters type.
Also, make sure to check out http://developer.vectorworks.net/index.php/Main_Page. it contains a lot of valuable info on scripting, with examples.
Add yourself to the mailing list: http://www.vectorworks.net/community/mailinglists. You can then look up problems others had, and help with new ones. I find it also a great learning resource, as if you can't help, you can learn from the solutions of others.
Oh, and if you are just starting out, I would suggest using Python for you scripts, as it's so much better and easier to use! If you go for Python, also check out https://bitbucket.org/dieterdworks/vw-dlibrary, a free open-source library for making plugin development so much easier.
Welcome to the scripting world of VW!
-
Make joining work with 4 walls please.
-
I sell such a plugin, which also fills in the date and filename for you. see http://www.dworks.be/en/ for DUpdateTitleBlocks.
I'm working on a replacement for it, for which you can then administer all project related data and don't even have to enter your data in the title blocks anymore, as it will all happen automatically.
Python vs C++ SDK
in Python Scripting
Posted
Great to hear that others really benefit from it. I'm working on a better version of it, as I didn't got everything right from the start. (as is normal for every software thing). Even adding some more helpful docs to get you started as imho, there are some really helpful stuff in the library to setup your plugin very easily. Everyone is welcome to collaborate, even if it's just logging issues are wish list items etc...