Jump to content

Jiajing

Member
  • Posts

    102
  • Joined

  • Last visited

Everything posted by Jiajing

  1. Thank you both for those details. After reading Pat's reply about criteria, I am with Josh to eliminate select object, which seems redundant. I ended up using ForEachObjectInLayer(), and it works great. Python noramlly doesn't care about double quotes or single with fewer exceptions. Really appricate all the supports. --Jiajing
  2. Thank you Josh and Pat. I am still learning vs and Pscal structure, your responses help a lot. I didn't realized ForEachObject is iterating over each object and that casued the problem. Regarding selection in ForEachObject, it seems will not work if criteria is missing. It would be helpful if there is a referencing list of arguments we could pass in as a criteria. Taking all suggestions, I cleaned up the script and reconstructed it in python. However, I am still not sure what is HANDLE doing in vs. Even the script does its thing, but I believe there is error on ForEachObjectInList. Following is current script: import vs #class name needs to be assigned to myClass = "none" vs.DSelectAll vs.SelectObj("INSYMBOL & INVIEWPORT & (L='Grid')") # Assign color and lineweight to specified objects def ChangeLw(h): color = vs.RGBToColorIndex(0,11796,52428) vs.SetLW(h, 10); vs.SetPenFore(h,color); # Assign selected object to myClass def AssignClass(h): vs.SetClassN(h, myClass , True); vs.ForEachObject(ChangeLw,"SEL=TRUE") # Create dummy item vs.Locus(0,0) Dummy = vs.LNewObj #Assign each selected objects to myClass vs.ForEachObjectInList(AssignClass, 2, 2, vs.FInGroup(vs.GetParent(Dummy))); #Delete Dummy item vs.DelObject(Dummy); Thank you
  3. Thanks Pat. Is there a batter way to check the if statement without sort of creating a loop, I was trying to use ELSE , but get error. Congraduations to your daughters's college graduation
  4. Hello, I am modifying Set LineWeight script we had in forum by adding an alert dialog, so it shows which part of code has been executed. However, I get multiply alerts even I thought the script ends. The script checked Lineweight, if lw is 10 mil then it set color, if lw is not 10mil, it will be set to 10 and assigned color. Then the code should end. I am not sure why I get multiple alerts. Here is the code : PROCEDURE LineWeightChange; { (c) twk based off of original code by Petri Sakkinen 2008 } CONST newWeight = 10; PROCEDURE ChangeIt (h : HANDLE); VAR oldLW : INTEGER; BEGIN If (oldLW <> 10) THEN Begin oldLW := GetLW(h); SetLW(h, newWeight); SetPenFore(h, 0,11796,52428); AlrtDialog ('Grid set to blue with LW 0.25'); End; IF (oldLW = 10) THEN Begin SetPenFore(h, 0,11796,52428); AlrtDialog ('Grid set to blue'); End; END; BEGIN DSelectAll; SelectObj((INSYMBOL & INVIEWPORT & (L='Grid'))); FOREACHOBJECT(ChangeIt, ((SEL=TRUE))); END; RUN(LineWeightChange); Thank you
  5. Yep. That is correct. That is why I have to save 2020 file as 2019 and prep for paperworks.
  6. Thanks. I made it work by using @Pat Stanford method, which is quite easy. Couple of things I noticed when I did that: 1. For some reason, LW does not take either Absolute Address field nor Universe/Address field in my 2019 file. That was part of reason why I have to migrate data from Absolute Address to Address fiels in order to syncing LW. 2. I am not sure if refresh instruments will update Address fields. 3. Odd thing is , in my case, I was not about to delete Absolute Address data, it just won't let me do it. I ended up with not dispalying those fields in my VW2019 file, because those old data could be confusion as I update Address field in the future.
  7. Thank you , @Pat Stanford . I will try that. Much Appreciated.
  8. Hello All, Since VW 2020 has new way to deal with address, I have a VW 2019 file converted from Vw2020. all fixture address info are in Absolute Address field, I am not able to sync address info to LW using that field. I am wondering is there a way I can migrate address info from ABSOLUTE ADDRESS field to ADDRESS fiel in VW2019, that way I can sync with LW for paperworks. Thank you.
  9. Hello @Nikolay Zhelyazkov @Pat Stanford Thank you for reply. Just curious that I have 1/2"=1'-0" scale in a viewport setting, once I linked the text to SHEET DATA SCALE in title block layout, I thought it will show scale in the same style as viewport has. But manually typing in works as I did in VW2019. Thank you.
  10. Hello, I am using title block manager, in the sheet data, is there a way to show scale as 1/4" = 1'-0" instead of 1:1 when I hit Update Scale button. Thanks
  11. klinzey is right. I only make it work by inputing address info in the LW and sync back to VW, not the other way around. Thanks Klinzey
  12. I have a question about reference files. I have use layer color on both in the master and the reference file, when I create a viewport in the master file and assign it to sheet layer. the reference file does not show the layer colors, is there an option I forget to turn on? Thank you
  13. Hello all, I have a question about active class please. I have my own active class activated, then use insert truss tool or straight truss tool to place truss, the truss will assigned to None class instead of active class. but with the same active class activated, when I place an lighting fixture, it assgned to the active layer. Is there anything I am missing here to have this problem? I am showing the situation in the video attached with this case. Any inputs are welcome. I am using PC, VW 2019 Sp4. Thank you. bandicam 2019-08-09 17-49-55-501.mp4
  14. Hello, In VW2019 SP1, the fill foreground color and fill background color will be reversed when I am exporting plot to PDF, and review it in MAC Preview, but it look correct in Adobe Acrobat. Any Ideas?
  15. Hello all, I am using VW 2019 with SP1 on Mac 10.14, the issue is when I use photometric grid tools, VW will froze and then not responding. Is it just me or it is a general problem? Thank you
  16. Hello Mark, Thanks for reply. My bad, I ignored dimension layer which was already in venue drafting(turn to invisibly), and I created a new dimension layer, assigned all dimension to this dimension layer , which turn out to be green markers. Thanks
  17. Hello, I have question about angular dimension tool. for some reason, it doesn't show up properly. Attached is screen shot file. Only thing it shows is green markers on both lines. It doesn't show how much degree it is. Same thing with all dimension tool. change setting on dimension layer? Any ideas why that happens? Thanks.
  18. Hello Markdd, I am using Create Plot and Model View function in Spotlight as well, so some reason, when I hang lights on definition layer, it doesn't show up on the model layer, do you know how to fix? Thank you!
  19. Hey, I am not using reference symbols. I import symbol from VW library. The thing is if I start with blank file. it will not happened. That specific file happens. So in this file, the 3d modeling is built by old version and i am trying to draw plot based on that. In term of restarting of VW, I assume is to quit VW and launch again. I tried that, it does not help for some reason. I am still looking for solution . Thank you so much.
  20. Hello, I have a question about rendering on VW. I have 2D view, by using create plot and model view, all lighting position have 3D view. When I hang the lights and focus on stage like that: but in 3D view, lights facing the opposite way, like this does anyone know how to fix it and why that happened ? Thanks
  21. Hello all, I have a issue to save VW file under a folder with Folder name in Mandarin. It is a blank file, IF I choose save as then select a folder which name is in Mandarin, it does not work and a warning pops out, please see attachment。 It works if folder name is in english. MAC is my OS , Any ideas? Thanks
  22. Hello Everyone, I have a very simple question about VW 2017. When I am trying to edit 6" Fresnel and using shutter to cut the beam field, the software will collapse. I do not know whether it is a general problem or an individual case. Attached is crash log. Anyone knows why that happens? Thank you! Process.docx
  23. I have try to use blank file and it still the same. No matter what if you active "Trailing Zero" or not.
  24. Yes, that happened with rectangle.
×
×
  • Create New...