[Pa...] Posted June 19 Share Posted June 19 is there a formula/PCM command that lets you show or hide a specific CAD model? for instance i have 2 CAD models but I'd like to hide one of them until a certain point in the program, then turn on the 2nd CAD model. this is a program in which we check 1 part, then assemble it with a 2nd part and continue checking. thanks Link to comment Share on other sites More sharing options...
[An...] Posted June 19 Share Posted June 19 As far as I know, all the CAD move, rotate, reflect, etc. methods effect all models loaded, cannot target specific entities using those methods. I'm sure there's an executeCode() that could do it, but I ain't got time for that lol. Could use a mix of clearCAD() and loadCADFile() to give the same effect though. clearCAD() kills EVERYTHING, even simulation stylus system/machine, and might turn off the XYZ trihedron loadCADFile() uses a full file path, might need getActualInspectionDir() + "\modelname.extension" depending on where you keep the models setCoordSysVisible(true) will bring back the trihedron if it's gone setFit() if you want to, fit screen to all the models loaded Example below assumes you start with the first model already loaded, then resets to the first model at the end of program. This could be inverted if you like. // Hypothetically starts with first.sab already loaded firstCADFile = getActualInspectionDir() + "\first.sab" secondCADFile = getActualInspectionDir() + "\second.sab" // Load second model at certain point in program loadCADFile(secondCADFile) setFit() // Fit view to newly loaded CAD, optional! // At end of program clearCAD() loadCADFile(firstCADFile) setCoordSysVisible(true) // Restore the cleared trihedron setFit() // Fit view to newly loaded CAD, optional! Not ideal, screen might flicker real quick while swapping out CAD models, but should do the job! Hope this helps! Link to comment Share on other sites More sharing options...
[Ro...] Posted June 20 Share Posted June 20 I cant provide any code because where I'm at I don't have pcm anymore, however when I did do something similar I would import and transform my model, one at a time, then I would save the model using "CAD>CAD File>Save as" an ACIS file into the folder for the part I was programming. Then when using clearCAD and loadCAD commands the model would come in just how and where you saved it. Link to comment Share on other sites More sharing options...
[Pa...] Posted June 20 Author Share Posted June 20 Please sign in to view this quote. hey that does the trick! thanks for that. i still wish there was a somewhat simpler way to turn on/off CAD entities without having to clear and reload the cad models, but this will work for now. thanks again. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in