Jump to content

avictorgm

Member
  • Content Count

    21
  • Joined

  • Last visited

Community Reputation

0 Neutral

1 Follower

About avictorgm

  • Rank
    Greenhorn

Personal Information

  • Location
    Germany

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. OK Forget it. I GOT it!! The problem comes with the value of Lasten---> you need to correct with : vs.Num2Str(decPlace, v) ----> vs.Num2Str(0, Lasten2)
  2. In other Topic you got me on the way to read the value of the databank of a symbol. Now the problem is exactly the contrary. I want to create a new symbol with 200 written in the textfield, but comes 60! Lasten = 200Kg the databank is named: "LOADS_DB" The field of the databank is named: "Lasten" but somehow that leaves another totally different number in the field Lasten---> 60 I feel the problem is in the last line of code. Any help? vs.SetRField(SYMBOLO2,'LOADS_DB','Lasten', vs.Num2StrF(Lasten2))
  3. At the end I GOT IT!!!! Took me a little, but after this a whole world of possibilities has opened to me! import vs #Vistor Garzon 2020 based on the work of # ©MaKro - June 2018 ;-) H1 = vs.FSActLayer() H2 = vs.ActSymDef(H1) recname = vs.GetName(H2) # Name of PIO in InfoPalette Rec_Name = vs.GetObject(recname) fld = vs.GetRField(H1,'loads-roof','Deckenlast') ##### vs.GetRField(h,'DatabankName','FieldName') vs.AlrtDialog(fld)
  4. the best software i know is Arcgis. Take a look here, the Database and reference of the TIFF files was made with QGIS, and the video edited and entirely made with ArcGIS. https://www.youtube.com/channel/UCARALX_xnppFaMKUYaKY9sA/videos Maybe Vectorworks Landmarkt would help you?
  5. You got a message! by the way, my email is avictorgm@gmail.com i am always reachable here.
  6. Hi, My Name: Victor My Skills: Python, Excel Makros, BIM expert... My experience: Besides, GIS and Statik Engineering--> 4 years Event engineering using spotlight Examples of my Scripts: 1) A script that substitute one specific symbol for a custom group of simbols depending of the position. 2) Another that check every layer looking for an specific symbol name to check how many exist in layers with specific names. On that way you avoid to add hundred exceptions to the Material List. 3) Another that creates several layout layers around the exact coordinates of an area. Each one with different selection of classes and layers. So, for example: the first has only the forest layers on, with classes of animals off. the second one can be the layers with the word "water" in the name. 4) Layer Creator, I mean, with one click you can create several layers with specific extension names based on the first given name/code. 5) Automatic measuring of simbols. very usefull if you have 50 simbols inside an area and have no time to loose clicking, and clicking, and clicking...
  7. That is pretty cool!! @MullinRJ So, whatever I do with the script, there´s no difference in the settings. This kind of details make the difference. Thank you
  8. Hello, No way to rename objects (rectangle or polygons) with: Even with 3D polygons the problem is the same. But If the element is a sphere it works. Why? vs.SetName() import vs ObjectName = vs.GetName(vs.FSActLayer()) vs.AlrtDialog(str(ObjectName)) SName = 'Fred' points = [0,0,-0.5,1,0.5,1.5,2,1,1,-0.5,0,0] h1 = vs.Poly(*points) vs.SetName(h1, SName) import vs X1 = 100 Y1 = 150 X2 = 0 Y2 = 500 NombreStand = 'Nombre' SName = vs.Concat(NombreStand) h = vs.Poly(0,0,X1,Y1,X2,Y2,0,0) h1 = vs.SetPolyClosed(h, 1) h2 = vs.MakePolygon(h1) vs.DSelectAll() vs.SetName(h2, SName) This one works perfect! import vs ObjectName = vs.GetName(vs.FSActLayer()) vs.AlrtDialog(str(ObjectName)) SName = 'Fred' h1 = vs.CreateSphere(0, 0, 0, 1000) vs.SetName(h1, SName) I am wondering if the problem is that are 2D elements, (that has no sense at all)
  9. Hello people, I just edit because I found this way. import vs import os Vendor = 'ACME' Price = 123.45 Tax = 1.07 fileName = 'Classes.txt' def Example(): vs.GetFile(fileName) if not vs.DidCancel(): vs.Rewrite(Vendor, 0) #vs.WriteBin(Vendor) #vs.WriteMac(Vendor) #vs.WriteLnMAC(Vendor) #vs.Write(Vendor) vs.Close(fileName) Example() But, the next attributes get this message: "AttributeError: module 'vs' has no attribute 'WriteBin'. " -vs.Write -vs.WriteLnMac -vs.WriteBin -vs.WriteMac With write I don't get error, but also no result. -vs.Rewrite
  10. If I use --> vs.FillBack(4) #number of color on the list of vectorworks = Blue before this vs.CreateText(... works perfect Thank you again @MullinRJ
  11. @MullinRJ ⬅️ GENIUS Thank you so much. You just save my day! vs.CreateText(str("Motor ") + str(X1) + str(", ") + str(Y1)) h = vs.LNewObj() # if you want to save the handle to the text object vs.SetFPat(h, 1) vs.PenBack((0, 36535, 0)) #RED
  12. import vs X1 = -3000 Y1 = -1500 vs.DSelectAll() vs.MoveTo(X1,Y1+18.5) #Move the pointer to vs.PenSize(10) #outside line of the box def Texto(): vs.TextRotate(271) vs.TextSize(12) vs.TextJust(1) #Left 1, Center 2, Right 3 vs.TextVerticalAlign(3) #Leading / space, Constant Single space 2 ,1 1/2 3 , Double space 4 #colorIndex = vs.RGBToColorIndex(1, 45, 23) #vs.TextBack(colorIndex) # using Color Index values #vs.OpacityN(100, 100) #vs.OpacityN(fillOpacity symbol include, penOpacity) #vs.PenSize(24) # DEFINIR GROSOR DE LINEA EXTERIOR DE RECTANGULO # 1 = 0,03 # X = 0,025 * X # 8 = 0,20 # 24 = 0,6 #vs.SetStaticTextStyle(3) vs.TextFont(vs.GetFontID('Times')) #vs.TextStyle(3) #vs.FillPat(1) #vs.FillBack(126) vs.PenPat(1) # Change for the document vs.FillBack(7) # Change background color for the document but not of the text vs.PenFore(120,0,0) #Change text color of fixed text to Purple vs.FillPat(53) vs.PenBack(0,255,0) #vs.FillPat(1) #vs.FillFore(0,0,255) # Blue Texto() h = vs.CreateText(str("Motor ") + str(X1) + str(", ") + str(Y1)) # -1 = linienart # 0 = linea invisible o vacia / Leer # 1 = solid # 2 = ? # 3 = muster / estampado # 4 = ? # 5 = ? #vs.PenFore(123) #vs.FillPat(53) # 0 = empty # 1 = solid # 2 = # x = count number in the table of examples # 21 = small squares #vs.Rect(X1+150,Y1+200,400,500) Hello I have tried many options to change the attributes of the static text to purple text and back color red. I got half, the text color. I can even change the color of the background of the document. But somehow the pattern of the background stays in empty option for the text. What small line of text am I missing?
  13. Hello again, I have. a code to go thru every element / symbol in my layer until it finds a rectangle. then, I just need to get selected only this element. A) I use X = 10 just to put a number. I need to count the number of elements. the script works well until B) where it doesn't get the rectangle to zoom it whit the next line Some ideas? import vs x = 10; #-A)----------I need to count the number of objects in the layer #vs.AlrtDialog(vs.Concat('Nr of objects is: ', ***Count of all the elements in the layer*** )) vs.DSelectAll vs.LActLayer() OBJETO = vs.LActLayer() SymbolName = vs.GetSymName(OBJETO) while x > 0: ElementTYPE = vs.GetType(OBJETO) if ElementTYPE == 15: SymbolName = vs.GetSymName(OBJETO) vs.AlrtDialog(vs.Concat(str(ElementTYPE), " Name: ", str(SymbolName))) #vs.AlrtDialog(vs.Concat('Object is a ', objectTypes[vs.GetType(h)])) if ElementTYPE == 3: vs.AlrtDialog(str('Recuadro encontrado')) vs.AlrtDialog(str(ElementTYPE)) #B).........I wanna set active the rectangle vs.GetObject() vs.DoMenuTextByName('Fit To Objects', 0); break OBJETO = vs.PrevObj(OBJETO) x = x - 1

 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×
×
  • Create New...